Petition for Relief From a Conviction or Sentence By a Person in State Custody (Petition Under 28 U. S. C. § 2254 for a Writ of Habeas Corpus). Petition for Writ of Habeas Corpus.This means that you can only file a federal habeas petition if you have already lost your state direct appeal and your state post-conviction proceedings. You should use this form if. Introduction. This pamphlet is intended as a general guide to assist a person in prosecuting a civil matter in the Appellate Division, Second Department. Print it underneath.