code: def _validate_jp2h(self, boxes):
          
          self._check_jp2h_child_boxes(boxes, 'top-level')
  
          jp2h_lst = [box for box in boxes if box.box_id == 'jp2h']
          jp2h = jp2h_lst[0]
  
          # 1st jp2 header box cannot be empty.
          if len(jp2h.box) == 0:
              msg = "The JP2 header superbox cannot be empty."
              raise IOError(msg)
  
          # 1st jp2 header box must be ihdr
          if jp2h.box[0].box_id != 'ihdr':
              msg = ("The first box in the jp2 header box must be the image "
                     "header box.")
              raise IOError(msg)
  
          # colr must be present in jp2 header box.
          colr_lst = [j for (j, box) in enumerate(jp2h.box)
                      if box.box_id == 'colr']
          if len(colr_lst) == 0:
              msg = "The jp2 header box must contain a color definition box."
              raise IOError(msg)
          colr = jp2h.box[colr_lst[0]]
  
          self._validate_channel_definition(jp2h, colr)
docs: Validate the JP2 Header box.