Every person imprisoned or otherwise restrained of his liberty may petition for a writ of habeas corpus to inquire into the reasons for the imprisonment or restraint. If the reasons are found to be illegal, the detainee shall be released from custody by order of the Community Court.
(Port Gamble S’Klallam Law and Order Code.)