docstr: Set current context to a new context default.
docstr_tok: ["Set","current","context","to","a","new","context","default","."]
code: def set_current_context(
      self, context: str | None
  ) -> CloudClientContext:
      """Set current context to a new context default."""
      try:
          new_context = self.get_context(context)
      except CloudRESTApiClientError as err:
          raise err from None
      new_config = attr.evolve(
          self, current_context_name=new_context.name
      )
      new_config.to_yaml_file()
      return new_context
  
imports: from __future__ import annotations
  import logging
  import typing
  import attr
  import yaml
  from simple_di import Provide
  from simple_di import inject
  from ...exceptions import CloudRESTApiClientError
  from ..configuration.containers import BentoMLContainer
  from ..utils import bentoml_cattr
  from .client import RestApiClient
label_desc: Use image node_id 2 for calling the CloudClientConfig obj's underlying member method code with example usage: obj.set_current_context(context) and returns: new_context