code: def save(self, filename):
          
          self.doc.save(os.path.expanduser(filename))
docs: Save document to a file.
  
          Parameters
          ----------
          filename : str
              The output string filename