A legal order for an investigation into whether a person who is arrested has been imprisoned legally defines what?