code: def save(self, file, contents, name=None, overwrite=False):
          
          if name is None:
              name = self.format_from_extension(op.splitext(file)[1])
          file_format = self.file_type(name)
          if file_format == 'text':
              _write_text(file, contents)
          elif file_format == 'json':
              _write_json(file, contents)
          else:
              write_function = self._formats[name].get('save', None)
              if write_function is None:
                  raise IOError("The format must declare a file type or "
                                "load/save functions.")
              if op.exists(file) and not overwrite:
                  print("The file already exists, please use overwrite=True.")
                  return
              write_function(file, contents)
docs: Save contents into a file. The format name can be specified
          explicitly or inferred from the file extension.