docs: def save(filename, data, format=None, **kwargs):
      '''
      save(filename, data) writes the given data to the given filename then yieds that filename.
      save(filename, data, format) specifies that the given format should be used; this should be the
        name of the exporter (though a file extension that is recognized also will work).
  
      Additionally, functions located in save.<format> may be used; so, for example, the following
      are equivalent calls:
        save(filename, image, 'nifti')
        save.nifti(filename, image)
      In fact, the save.nifti function is just the nifti exporter, so help(save.nifti) will also
      yield documentation for the nifti exporter.
  
      Keyword options may be passed to save; these must match those accepted by the given export
      function.
      '''
      filename = os.path.expanduser(os.path.expandvars(filename))
      if format is None:
          format = guess_export_format(filename, data, **kwargs)
          if format is None:
              raise ValueError('Could not deduce export format for file %s' % filename)
      else:
          format = format.lower()
          if format not in exporters:
              # it might be an extension
              fmt = next((k for (k,(_,es,_)) in six.iteritems(exporters) if format in es), None)
              if fmt is None:
                  # okay, no idea what it is
                  raise ValueError('Format \'%s\' not recognized by neuropythy' % format)
              format = fmt
      (f,_,_) = exporters[format]
      return f(filename, data, **kwargs)