def _check_jp2h_child_boxes(self, boxes, parent_box_name):
JP2H_CHILDREN = set(['<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>'])<EOL>box_ids = set([box.box_id for box in boxes])<EOL>intersection = box_ids.intersection(JP2H_CHILDREN)<EOL>if len(intersection) > <NUM_LIT:0> and parent_box_name not in ['<STR_LIT>', '<STR_LIT>']:<EOL><INDENT>msg = "<STR_LIT>"<EOL>raise IOError(msg.format(list(intersection)[<NUM_LIT:0>]))<EOL><DEDENT>for box in boxes:<EOL><INDENT>if hasattr(box, '<STR_LIT>'):<EOL><INDENT>self._check_jp2h_child_boxes(box.box, box.box_id)<EOL><DEDENT><DEDENT>
Certain boxes can only reside in the JP2 header.