class_docstr: Builder for a Ray Client connection. This class can be subclassed by
  custom builder classes to modify connection behavior to include additional
  features or altered semantics. One example is the ``_LocalClientBuilder``.
docstr: Generates a warning for user's if this ClientBuilder instance was
  created directly or through ray.client, instead of relying on
  internal methods (ray.init, or auto init)
docstr_tok: ["Generates","a","warning","for","user","'s","if","this","ClientBuilder","instance","was","created","directly","or","through","ray.client",",","instead","of","relying","on","internal","methods","(","ray.init",",","or","auto","init",")"]
code: def _client_deprecation_warn(self) -> None:
      """
      Generates a warning for user's if this ClientBuilder instance was
      created directly or through ray.client, instead of relying on
      internal methods (ray.init, or auto init)
      """
      namespace = self._job_config.ray_namespace
      runtime_env = self._job_config.runtime_env
      replacement_args = []
      if self.address:
          if isinstance(self, _LocalClientBuilder):
              # Address might be set for LocalClientBuilder if ray.client()
              # is called while ray_current_cluster is set
              # (see _get_builder_from_address). In this case,
              # leave off the ray:// so the user attaches the driver directly
              replacement_args.append(f'"{self.address}"')
          else:
              replacement_args.append(f'"ray://{self.address}"')
      if namespace:
          replacement_args.append(f'namespace="{namespace}"')
      if runtime_env:
          # Use a placeholder here, since the real runtime_env would be
          # difficult to read if formatted in directly
          replacement_args.append("runtime_env=<your_runtime_env>")
      args_str = ", ".join(replacement_args)
      replacement_call = f"ray.init({args_str})"
  
      # Note: stack level is set to 3 since we want the warning to reach the
      # call to ray.client(...).connect(). The intervening frames are
      # connect() -> client_deprecation_warn() -> warnings.warn()
      # https://docs.python.org/3/library/warnings.html#available-functions
      warnings.warn(
          "Starting a connection through `ray.client` will be deprecated "
          "in future ray versions in favor of `ray.init`. See the docs for "
          f"more details: {CLIENT_DOCS_URL}. You can replace your call to "
          "`ray.client().connect()` with the following:\n"
          f"      {replacement_call}\n",
          DeprecationWarning,
          stacklevel=3,
      )
  
imports: import importlib
  import inspect
  import json
  import logging
  import os
  import sys
  import warnings
  from dataclasses import dataclass
  from typing import Any, Dict, Optional, Tuple
  import ray.util.client_connect
  from ray._private.ray_constants import RAY_ADDRESS_ENVIRONMENT_VARIABLE, RAY_NAMESPACE_ENVIRONMENT_VARIABLE, RAY_RUNTIME_ENV_ENVIRONMENT_VARIABLE
  from ray._private.utils import check_ray_client_dependencies_installed, split_address
  from ray._private.worker import BaseContext
  from ray._private.worker import init
  from ray.job_config import JobConfig
  from ray.util.annotations import Deprecated, PublicAPI
label_desc: Use image node_id 7 for calling the ClientBuilder obj's underlying member method code with example usage: obj._client_deprecation_warn() without return types