code: def get_config(
      cls, cloud_config: Path = Provide[BentoMLContainer.cloud_config]
  ) -> CloudClientConfig:
      if not cloud_config.exists():
          return cls.default_config()
      with cloud_config.open("r") as stream:
          try:
              yaml_content = yaml.safe_load(stream)
          except yaml.YAMLError as exc:
              logger.error(exc)
              raise
  
          if not yaml_content:
              return cls.default_config()
          return bentoml_cattr.structure(yaml_content, cls)
  
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 6 for calling the CloudClientConfig obj's underlying member method code with example usage: obj.get_config(cls, cloud_config) and returns: cls, bentoml_cattr, cls