code: def save(self, filename=None):
          
          if filename is None:
              filename = self.filename
          with open(filename, 'wb') as f:
              f.write(self.data)
docs: Save the smart object to a file.
  
          :param filename: File name to export. If None, use the embedded name.