def _validate_jp2_box_sequence(self, boxes):
JP2_IDS = ['<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>',<EOL>'<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>',<EOL>'<STR_LIT>', '<STR_LIT>', '<STR_LIT>']<EOL>self._validate_signature_compatibility(boxes)<EOL>self._validate_jp2h(boxes)<EOL>self._validate_jp2c(boxes)<EOL>if boxes[<NUM_LIT:1>].brand == '<STR_LIT>':<EOL><INDENT>self._validate_jpx_box_sequence(boxes)<EOL><DEDENT>else:<EOL><INDENT>count = self._collect_box_count(boxes)<EOL>for box_id in count.keys():<EOL><INDENT>if box_id not in JP2_IDS:<EOL><INDENT>msg = ("<STR_LIT>"<EOL>"<STR_LIT>")<EOL>raise IOError(msg.format(box_id))<EOL><DEDENT><DEDENT>self._validate_jp2_colr(boxes)<EOL><DEDENT>
Run through series of tests for JP2 box legality.

        This is non-exhaustive.