def _validate_jpx_compatibility(self, boxes, compatibility_list):
JPX_IDS = ['<STR_LIT>', '<STR_LIT>']<EOL>jpx_cl = set(compatibility_list)<EOL>for box in boxes:<EOL><INDENT>if box.box_id in JPX_IDS:<EOL><INDENT>if len(set(['<STR_LIT>', '<STR_LIT>']).intersection(jpx_cl)) == <NUM_LIT:0>:<EOL><INDENT>msg = ("<STR_LIT>"<EOL>"<STR_LIT>")<EOL>raise RuntimeError(msg)<EOL><DEDENT><DEDENT>if hasattr(box, '<STR_LIT>') != <NUM_LIT:0>:<EOL><INDENT>self._validate_jpx_compatibility(box.box, compatibility_list)<EOL><DEDENT><DEDENT>
If there is a JPX box then the compatibility list must also contain
'jpx '.