Corpus Habeas Habeas Corpus The writ of habeas corpus is used to attack an unlawful detention or illegal imprisonment…