docs: def _server_url(server):
      """
      Normalizes a given server string to an url
  
      >>> print(_server_url('a'))
      http://a
      >>> print(_server_url('a:9345'))
      http://a:9345
      >>> print(_server_url('https://a:9345'))
      https://a:9345
      >>> print(_server_url('https://a'))
      https://a
      >>> print(_server_url('demo.crate.io'))
      http://demo.crate.io
      """
      if not _HTTP_PAT.match(server):
          server = 'http://%s' % server
      parsed = urlparse(server)
      url = '%s://%s' % (parsed.scheme, parsed.netloc)
      return url