code: def read_length_and_key(fp):
      
      length = read_fmt('I', fp)[0]
      key = fp.read(length or 4)
      if length == 0 and key not in _TERMS:
          logger.debug('Unknown term: %r' % (key))
          _TERMS.add(key)
      return key
docs: Helper to read descriptor key.