code: def compress(bytes, target):
  
          
  
          length = len(bytes)
          if target > length:
              raise ValueError("Fewer input bytes than requested output")
  
          # Split `bytes` into `target` segments.
          seg_size = length // target
          segments = [bytes[i * seg_size:(i + 1) * seg_size]
                      for i in range(target)]
          # Catch any left-over bytes in the last segment.
          segments[-1].extend(bytes[target * seg_size:])
  
          # Use a simple XOR checksum-like function for compression.
          checksum = lambda bytes: reduce(operator.xor, bytes, 0)
          checksums = list(map(checksum, segments))
          return checksums
docs: Compress a list of byte values to a fixed target length.
  
              >>> bytes = [96, 173, 141, 13, 135, 27, 96, 149, 128, 130, 151]
              >>> HumanHasher.compress(bytes, 4)
              [205, 128, 156, 96]
  
          Attempting to compress a smaller number of bytes to a larger number is
          an error:
  
              >>> HumanHasher.compress(bytes, 15)  # doctest: +ELLIPSIS
              Traceback (most recent call last):
              ...
              ValueError: Fewer input bytes than requested output