For the incarcerated (or their families):
A habeas corpus is an action at common law that challenges the jurisdiction (authority) of a detention, and it obligates a judge to bring the person before him for examination. Supported by affidavit, the key issue is swearing to the violation of liberty done by the authority (usually a statute) that detained the man or woman.
Often, statutes are wrongly applied to people are usually done with legal conclusions instead of with evidence. Evidence cannot be the result of reason but of a witness/victim.
A government investigator’s report is not a witness statement. It is a legal conclusion.
For centuries, habeas corpus has freed many unlawfully detained people. That it exists proves its practice.