class_docstr: Basic context manager for a ClientBuilder connection.
code: def _swap_context(self):
      if self._context_to_restore is not None:
          self._context_to_restore = ray.util.client.ray.set_context(
              self._context_to_restore
          )
  
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 4 for calling the ClientContext obj's underlying member method code with example usage: obj._swap_context() without return types