parameters: (data)
return_statement: return f.getvalue()
docstring: data -> gzip encoded data
  
      Encode data using the gzip content encoding as described in RFC 1952
docstring_summary: data -> gzip encoded data
docstring_tokens: data - > gzip encoded data
function: def gzip_encode(data):
      """data -> gzip encoded data
  
      Encode data using the gzip content encoding as described in RFC 1952
      """
      if not gzip:
          raise NotImplementedError
      f = BytesIO()
      with gzip.GzipFile(mode="wb", fileobj=f, compresslevel=1) as gzf:
          gzf.write(data)
      return f.getvalue()
function_tokens: def gzip_encode ( data ) : if not gzip : raise NotImplementedError f = BytesIO ( ) with gzip . GzipFile ( mode = "wb" , fileobj = f , compresslevel = 1 ) as gzf : gzf . write ( data ) return f . getvalue ( )