code: def lz4f_decode(payload):
      
      # pylint: disable-msg=no-member
      ctx = lz4f.createDecompContext()
      data = lz4f.decompressFrame(payload, ctx)
      lz4f.freeDecompContext(ctx)
  
      # lz4f python module does not expose how much of the payload was
      # actually read if the decompression was only partial.
      if data['next'] != 0:
          raise RuntimeError('lz4f unable to decompress full payload')
      return data['decomp']
docs: Decode payload using interoperable LZ4 framing. Requires Kafka >= 0.10