The term writ of habeas corpus refers to