docs: def read_cz_lsminfo(fh, byteorder, dtype, count, offsetsize):
      """Read CZ_LSMINFO tag from file and return as dict."""
      assert byteorder == '<'
      magic_number, structure_size = struct.unpack('<II', fh.read(8))
      if magic_number not in (50350412, 67127628):
          raise ValueError('invalid CZ_LSMINFO structure')
      fh.seek(-8, 1)
  
      if structure_size < numpy.dtype(TIFF.CZ_LSMINFO).itemsize:
          # adjust structure according to structure_size
          lsminfo = []
          size = 0
          for name, dtype in TIFF.CZ_LSMINFO:
              size += numpy.dtype(dtype).itemsize
              if size > structure_size:
                  break
              lsminfo.append((name, dtype))
      else:
          lsminfo = TIFF.CZ_LSMINFO
  
      lsminfo = fh.read_record(lsminfo, byteorder=byteorder)
      lsminfo = recarray2dict(lsminfo)
  
      # read LSM info subrecords at offsets
      for name, reader in TIFF.CZ_LSMINFO_READERS.items():
          if reader is None:
              continue
          offset = lsminfo.get('Offset' + name, 0)
          if offset < 8:
              continue
          fh.seek(offset)
          try:
              lsminfo[name] = reader(fh)
          except ValueError:
              pass
      return lsminfo