code: def extension_by_source(source, mime_type):
      "Return the file extension used by this plugin"
  
      # TODO: should get this information from the plugin
      extension = source.plugin_name
      if extension:
          return extension
  
      if mime_type:
          return mime_type.split("/")[-1f extension_by_source(source, mime_type):
      "Return the file extension used by this plugin"
  
      # TODO: should get this information from the plugin
      extension = source.plugin_name
      if extension:
          return extension
  
      if mime_type:
          return mime_type.split("/")[-1]
docs: Return the file extension used by this plugin