In which of the following cases, the writ of habeas corpus is not issued?
1. Detention is outside the jurisdiction of the court.
2. When the martial law is imposed in a state.
3. When the proceeding is for contempt of a legislature or a court.
4. Where imprisonment is in accordance with a decision rendered by a court of law
Select the correct answer using the code given below: