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_raw(self, data):
      # Called by our self._buffer underlying WriteBufferStream.
      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 8 for calling the GzipFile obj's underlying member method code with example usage: obj._write_raw(data) and returns: length