Any individual hospitalized under this title or his or her attorney or an interested party may apply for a writ of habeas corpus from any court generally empowered to issue the writ in the jurisdiction in which he or she is detained.
18 V.S.A. § 8005