code: def decompress(self):
      codec = self.attributes & self.CODEC_MASK
      assert codec in (
          self.CODEC_GZIP,
          self.CODEC_SNAPPY,
          self.CODEC_LZ4,
          self.CODEC_ZSTD,
      )
      if codec == self.CODEC_GZIP:
          assert has_gzip(), "Gzip decompression unsupported"
          raw_bytes = gzip_decode(self.value)
      elif codec == self.CODEC_SNAPPY:
          assert has_snappy(), "Snappy decompression unsupported"
          raw_bytes = snappy_decode(self.value)
      elif codec == self.CODEC_LZ4:
          assert has_lz4(), "LZ4 decompression unsupported"
          if self.magic == 0:
              raw_bytes = lz4_decode_old_kafka(self.value)
          else:
              raw_bytes = lz4_decode(self.value)
      elif codec == self.CODEC_ZSTD:
          assert has_zstd(), "ZSTD decompression unsupported"
          raw_bytes = zstd_decode(self.value)
      else:
          raise Exception("This should be impossible")
  
      return MessageSet.decode(raw_bytes, bytes_to_read=len(raw_bytes))
  
imports: from __future__ import absolute_import
  import io
  import time
  from kafka.codec import has_gzip, has_snappy, has_lz4, has_zstd, gzip_decode, snappy_decode, zstd_decode, lz4_decode, lz4_decode_old_kafka
  from kafka.protocol.frame import KafkaBytes
  from kafka.protocol.struct import Struct
  from kafka.protocol.types import Int8, Int32, Int64, Bytes, Schema, AbstractType
  from kafka.util import crc32, WeakMethod
label_desc: Use image node_id 7 for calling the Message obj's underlying member method code with example usage: obj.decompress() and returns: MessageSet