code: def get_url(path, host, port, method="http"):
      
      return urlunsplit(
          (method, "%s:%s" % (host, port), path, "", "")
      )
docs: make url from path, host and port
  
      :param method: str
      :param path: str, path within the request, e.g. "/api/version"
      :param host: str
      :param port: str or int
      :return: str