def METHOD_NAME(self) -> Session:
    auth_class = {
        'basic': HTTPBasicAuth,
        'digest': HTTPDigestAuth,
        'oauth1': OAuth1,
        'oauth2_backend': oauth2_backend,
        'oauth2_oidc': oauth2_oidc,
        'custom_token_server': CustomTokenServer,
    }.get(self.type.value)
    kwargs = {} if not self.kwargs else self.kwargs
    auth_instance = auth_class(*self.args, **kwargs)
    # Some authentification mechanisms are built-in a Session...
    if isinstance(auth_instance, Session):
        return auth_instance
    # ... but other are just added as the auth attr of the Session
    session = Session()
    session.auth = auth_instance
    return session