code: def from_url(cls, server_url: str, **kwargs: t.Any) -> SyncHTTPClient:
      server_url = (
          server_url if "://" in server_url else "http://" + server_url
      )
  
      with httpx.Client(base_url=server_url) as session:
          resp = session.get("docs.json")
          if resp.status_code != 200:
              raise RemoteException(
                  f"Failed to get OpenAPI schema from the server: {resp.status_code} {resp.reason_phrase}:\n{resp.content}"
              )
          openapi_spec = json.loads(resp.content)
  
      dummy_service = Service(openapi_spec["info"]["title"])
  
      for route, spec in openapi_spec["paths"].items():
          for meth_spec in spec.values():
              if (
                  "tags" in meth_spec
                  and "Service APIs" in meth_spec["tags"]
              ):
                  if (
                      "x-bentoml-io-descriptor"
                      not in meth_spec["requestBody"]
                  ):
                      # TODO: better message stating min version for from_url to work
                      raise BentoMLException(
                          f"Malformed BentoML spec received from BentoML server {server_url}"
                      )
                  if (
                      "x-bentoml-io-descriptor"
                      not in meth_spec["responses"]["200"]
                  ):
                      raise BentoMLException(
                          f"Malformed BentoML spec received from BentoML server {server_url}"
                      )
                  if "x-bentoml-name" not in meth_spec:
                      raise BentoMLException(
                          f"Malformed BentoML spec received from BentoML server {server_url}"
                      )
                  try:
                      api = InferenceAPI[t.Any](
                          None,
                          io.from_spec(
                              meth_spec["requestBody"][
                                  "x-bentoml-io-descriptor"
                              ]
                          ),
                          io.from_spec(
                              meth_spec["responses"]["200"][
                                  "x-bentoml-io-descriptor"
                              ]
                          ),
                          name=meth_spec["x-bentoml-name"],
                          doc=meth_spec["description"],
                          route=route.lstrip("/"),
                      )
                      dummy_service.apis[
                          meth_spec["x-bentoml-name"]
                      ] = api
                  except BentoMLException as e:
                      logger.error(
                          "Failed to instantiate client for API %s: ",
                          meth_spec["x-bentoml-name"],
                          e,
                      )
  
      return cls(dummy_service, server_url)
  
imports: from __future__ import annotations
  import asyncio
  import json
  import logging
  import time
  import typing
  from functools import cached_property
  import httpx
  import starlette.datastructures
  import starlette.requests
  from ...exceptions import BentoMLException
  from ...exceptions import RemoteException
  from ..None import io_descriptors
  from ..service import Service
  from ..service.inference_api import InferenceAPI
  from .None import AsyncClient
  from .None import Client
  from .None import SyncClient
label_desc: Use image node_id 4 for calling the SyncHTTPClient obj's underlying member method code with example usage: obj.from_url(cls, server_url) and returns: cls