code: def write(self, location, text, encoding):
          
          location = os.path.expanduser(location)
  
          with gzip.open(location, 'wb') as f:
              f.write(text.encode(encoding))
docs: Write file to disk.