def _set_profile()

in bonsaicli2/bonsai_cli/config.py [0:0]


    def _set_profile(self, section: Any):
        # Create section if it does not exist
        if not self._config_parser.has_section(section) and section != _DEFAULT:
            self._config_parser.add_section(section)

        # Set profile in class and config
        self.profile = section
        if section == _DEFAULT:
            self._config_parser.set(_DEFAULT, _PROFILE, "DEFAULT")
        else:
            self._config_parser.set(_DEFAULT, _PROFILE, str(section))