def METHOD_NAME(self, request):
    """
    Returns tuple (user, token) if access token authentication  succeeds,
    returns None if the user did not try to authenticate using an access
    token, or raises an AuthenticationFailed (HTTP 401) if authentication
    fails.
    """
    set_custom_attribute("BearerAuthentication", "Failed")  # default value
    auth = get_authorization_header(request).split()
    if len(auth) == 1:  # lint-amnesty, pylint: disable=no-else-raise
        raise AuthenticationFailed({
            'error_code': OAUTH2_TOKEN_ERROR_NOT_PROVIDED,
            'developer_message': 'Invalid token header. No credentials provided.'})
    elif len(auth) > 2:
        raise AuthenticationFailed({
            'error_code': OAUTH2_TOKEN_ERROR_MALFORMED,
            'developer_message': 'Invalid token header. Token string should not contain spaces.'})
    if auth and auth[0].lower() == b'bearer':
        access_token = auth[1].decode('utf8')
    else:
        set_custom_attribute("BearerAuthentication", "None")
        return None
    user, token = self.authenticate_credentials(access_token)
    set_custom_attribute("BearerAuthentication", "Success")
    return user, token