def _validate_label(self, boxes):
for box in boxes:<EOL><INDENT>if box.box_id != '<STR_LIT>':<EOL><INDENT>if hasattr(box, '<STR_LIT>'):<EOL><INDENT>for boxi in box.box:<EOL><INDENT>if boxi.box_id == '<STR_LIT>':<EOL><INDENT>msg = ("<STR_LIT>"<EOL>"<STR_LIT>")<EOL>msg = msg.format(box.box_id)<EOL>raise IOError(msg)<EOL><DEDENT><DEDENT>self._validate_label(box.box)<EOL><DEDENT><DEDENT><DEDENT>
Label boxes can only be inside association, codestream headers, or
compositing layer header boxes.