code: def plugin_name_by_uri(uri):
      "Return the plugin name based on the URI"
  
      # TODO: parse URIs like 'sqlite://' also
      parsed = urlparse(uri)
      basename = os.path.basename(parsed.path)
  
      if not basename.strip():
          raise RuntimeError("Could not identify file format.")
  
      plugin_name = basename.split(".")[-1].lower()
      if plugin_name in FILE_EXTENSIONS:
          plugin_name = MIME_TYPE_TO_PLUGIN_NAME[FILE_EXTENSIONS[plugin_name]]
  
      return plugin_namf plugin_name_by_uri(uri):
      "Return the plugin name based on the URI"
  
      # TODO: parse URIs like 'sqlite://' also
      parsed = urlparse(uri)
      basename = os.path.basename(parsed.path)
  
      if not basename.strip():
          raise RuntimeError("Could not identify file format.")
  
      plugin_name = basename.split(".")[-1].lower()
      if plugin_name in FILE_EXTENSIONS:
          plugin_name = MIME_TYPE_TO_PLUGIN_NAME[FILE_EXTENSIONS[plugin_name]]
  
      return plugin_name
docs: Return the plugin name based on the URI