    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
Set current context to a new context default.
src/bentoml/_internal/cloud/config.py