def METHOD_NAME(self, cfg: ConnectConfig) -> Self:
    """Set the connection config."""
    if self._session:
        logger.warning(
            "Cannot set connection config after connection already started"
        )
    else:
        self._cfg = cfg
    return self