def METHOD_NAME(self, config: AuthBearerToken) -> OAuth2Session:
    token: Dict[str, Union[str, int]] = {"access_token": config.access_token}
    if config.expires_in is not None:
        token["expires_in"] = config.expires_in
    if config.refresh_token is not None:
        token["refresh_token"] = config.refresh_token
    if "refresh_token" not in token:
        _Warnings.auth_no_refresh_token(config.expires_in)
    # token endpoint and clientId are needed for token refresh
    return OAuth2Session(
        token=token,
        token_endpoint=self._token_endpoint,
        client_id=self._client_id,
        default_timeout=AUTH_DEFAULT_TIMEOUT,
    )