def _validate_jp2h(self, boxes):
self._check_jp2h_child_boxes(boxes, '<STR_LIT>')<EOL>jp2h_lst = [box for box in boxes if box.box_id == '<STR_LIT>']<EOL>jp2h = jp2h_lst[<NUM_LIT:0>]<EOL>if len(jp2h.box) == <NUM_LIT:0>:<EOL><INDENT>msg = "<STR_LIT>"<EOL>raise IOError(msg)<EOL><DEDENT>if jp2h.box[<NUM_LIT:0>].box_id != '<STR_LIT>':<EOL><INDENT>msg = ("<STR_LIT>"<EOL>"<STR_LIT>")<EOL>raise IOError(msg)<EOL><DEDENT>colr_lst = [j for (j, box) in enumerate(jp2h.box)<EOL>if box.box_id == '<STR_LIT>']<EOL>if len(colr_lst) == <NUM_LIT:0>:<EOL><INDENT>msg = "<STR_LIT>"<EOL>raise IOError(msg)<EOL><DEDENT>colr = jp2h.box[colr_lst[<NUM_LIT:0>]]<EOL>self._validate_channel_definition(jp2h, colr)<EOL>
Validate the JP2 Header box.