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.
class_docstr_tok: ["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")
  
      return self._buffer.write(data)
  
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: self