code: def to_file(self, filename):
          
  
          # save compressed file
          xml = self.to_xml()
          f = gzip.open(filename, 'wb')
          try:
              f.write(xml.encode('utf-8'))
          finally:
              f.close()
docs: Save the store to disk