A state writ of habeas corpus is a court order requesting that the custodian of an imprisoned individual bring the individual before the court in order to determine whether his or her imprisonment is lawful.