hearingincludes any diet or hearing in criminal proceedings which may be held in the presence of an accused, a convicted person or an appellant in the proceedings. 288L For the purpose of sections 288H to 288K— • “detained person” means person who is— (a) an accused, a convicted person or an appellant in the case to which a specified hearing relates, and (b) imprisoned or otherwise lawfully detained (whether or not in connection with an offence) at any place in Scotland, • “place of detention” means place in which a detained person is imprisoned or detained, • “specified hearing” means hearing of a type specified in directions having effect for the time being under section 288K.”