def _check_superbox_for_top_levels(self, boxes):
<EOL>TOP_LEVEL_ONLY_BOXES = set(['<STR_LIT>'])<EOL>box_ids = set([box.box_id for box in boxes])<EOL>intersection = box_ids.intersection(TOP_LEVEL_ONLY_BOXES)<EOL>if len(intersection) > <NUM_LIT:0>:<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_superbox_for_top_levels(box.box)<EOL><DEDENT><DEDENT>
Several boxes can only occur at the top level.