code: def from_url(
      cls,
      server_url: str,
      *,
      kind: t.Literal["auto", "http", "grpc"] | None = None,
      **kwargs: t.Any,
  ) -> SyncClient:
      if kind is None or kind == "auto":
          try:
              from .http import SyncHTTPClient
  
              return SyncHTTPClient.from_url(server_url, **kwargs)
          except BadStatusLine:
              from .grpc import SyncGrpcClient
  
              return SyncGrpcClient.from_url(server_url, **kwargs)
          except Exception as e:  # pylint: disable=broad-except
              raise BentoMLException(
                  f"Failed to create a BentoML client from given URL '{server_url}': {e} ({e.__class__.__name__})"
              ) from e
      elif kind == "http":
          from .http import SyncHTTPClient
  
          return SyncHTTPClient.from_url(server_url, **kwargs)
      elif kind == "grpc":
          from .grpc import SyncGrpcClient
  
          return SyncGrpcClient.from_url(server_url, **kwargs)
      else:
          raise BentoMLException(
              f"Invalid client kind '{kind}'. Must be one of 'http', 'grpc', or 'auto'."
          )
  
imports: from __future__ import annotations
  import functools
  import logging
  import typing
  from abc import ABC
  from abc import abstractmethod
  from http.client import BadStatusLine
  from ...exceptions import BentoMLException
  from ..service.inference_api import InferenceAPI
label_desc: Use image node_id 11 for calling the SyncClient obj's underlying member method code with example usage: obj.from_url(cls, server_url) and returns: SyncHTTPClient, SyncHTTPClient, SyncGrpcClient, SyncGrpcClient