docs: def ensure_scheme(url, default_scheme='http'):
      """Adds a scheme to a url if not present.
  
      Args:
          url (string): a url, assumed to start with netloc
          default_scheme (string): a scheme to be added
  
      Returns:
          string: URL with a scheme
      """
      parsed = urlsplit(url, scheme=default_scheme)
      if not parsed.netloc:
          parsed = SplitResult(
              scheme=parsed.scheme,
              netloc=parsed.path,
              path='',
              query=parsed.query,
              fragment=parsed.fragment
          )
  
      return urlunsplit(parsed)