Any person who has been deprived of their liberty by a body other than a court has the right to have recourse to a court at any time. The court shall decide as quickly as possible on the legality of their detention.