docs: def guess_uri_type(uri: str, hint: str=None):
      """Return a guess for the URI type based on the URI string `uri`.
  
      If `hint` is given, it is assumed to be the correct type.
      Otherwise, the URI is inspected using urlparse, and we try to guess
      whether it's a remote Git repository, a remote downloadable archive,
      or a local-only data.
      """
      # TODO(itamar): do this better
      if hint:
          return hint
      norm_uri = uri.lower()
      parsed_uri = urlparse(norm_uri)
      if parsed_uri.path.endswith('.git'):
          return 'git'
      if parsed_uri.scheme in ('http', 'https'):
          ext = splitext(parsed_uri.path)[-1]
          if ext in KNOWN_ARCHIVES:
              return 'archive'
          return 'single'
      return 'local'