code: def _validate_label(self, boxes):
          
          for box in boxes:
              if box.box_id != 'asoc':
                  if hasattr(box, 'box'):
                      for boxi in box.box:
                          if boxi.box_id == 'lbl ':
                              msg = ("A label box cannot be nested inside a "
                                     "{0} box.")
                              msg = msg.format(box.box_id)
                              raise IOError(msg)
                      # Same set of checks on any child boxes.
                      self._validate_label(box.box)
docs: Label boxes can only be inside association, codestream headers, or
          compositing layer header boxes.