class_docstr: The GzipFile class simulates most of the methods of a file object with
  the exception of the truncate() method.
  
  This class only supports opening files in binary mode. If you need to open a
  compressed file in text mode, use the gzip.open() function.
code: def write(self, data):
      self._check_not_closed()
      if self.mode != WRITE:
          import errno
  
          raise OSError(
              errno.EBADF, "write() on read-only GzipFile object"
          )
  
      if self.fileobj is None:
          raise ValueError("write() on closed GzipFile object")
  
      if isinstance(data, (bytes, bytearray)):
          length = len(data)
      else:
          # accept any data that supports the buffer protocol
          data = memoryview(data)
          length = data.nbytes
  
      if length > 0:
          self.fileobj.write(self.compress.compress(data))
          self.size += length
          self.crc = zlib.crc32(data, self.crc)
          self.offset += length
  
      return length
  
imports: import struct, sys, time, os
  import zlib
  import builtins
  import io
  import _compression
label_desc: Use image node_id 7 for calling the GzipFile obj's underlying member method code with example usage: obj.write(data) and returns: length