def is_revoked(events, token_data):
    'Check if a token matches a revocation event.\n\n    Compare a token against every revocation event. If the token matches an\n    event in the `events` list, the token is revoked. If the token is compared\n    against every item in the list without a match, it is not considered\n    revoked from the `revoke_api`.\n\n    :param events: a list of RevokeEvent instances\n    :param token_data: map based on a flattened view of the token. The required\n                       fields are `expires_at`,`user_id`, `project_id`,\n                       `identity_domain_id`, `assignment_domain_id`,\n                       `trust_id`, `trustor_id`, `trustee_id` `consumer_id` and\n                       `access_token_id`\n    :returns: True if the token matches an existing revocation event, meaning\n              the token is revoked. False is returned if the token does not\n              match any revocation events, meaning the token is considered\n              valid by the revocation API.\n    '
    return any([matches(e, token_data) for e in events])
Check if a token matches a revocation event.

Compare a token against every revocation event. If the token matches an
event in the `events` list, the token is revoked. If the token is compared
against every item in the list without a match, it is not considered
revoked from the `revoke_api`.

:param events: a list of RevokeEvent instances
:param token_data: map based on a flattened view of the token. The required
                   fields are `expires_at`,`user_id`, `project_id`,
                   `identity_domain_id`, `assignment_domain_id`,
                   `trust_id`, `trustor_id`, `trustee_id` `consumer_id` and
                   `access_token_id`
:returns: True if the token matches an existing revocation event, meaning
          the token is revoked. False is returned if the token does not
          match any revocation events, meaning the token is considered
          valid by the revocation API.
def is_revoked(events, token_data):
    'Check if a token matches a revocation event.\n\n    Compare a token against every revocation event. If the token matches an\n    event in the `events` list, the token is revoked. If the token is compared\n    against every item in the list without a match, it is not considered\n    revoked from the `revoke_api`.\n\n    :param events: a list of RevokeEvent instances\n    :param token_data: map based on a flattened view of the token. The required\n                       fields are `expires_at`,`user_id`, `project_id`,\n                       `identity_domain_id`, `assignment_domain_id`,\n                       `trust_id`, `trustor_id`, `trustee_id` `consumer_id` and\n                       `access_token_id`\n    :returns: True if the token matches an existing revocation event, meaning\n              the token is revoked. False is returned if the token does not\n              match any revocation events, meaning the token is considered\n              valid by the revocation API.\n    '
    return any([matches(e, token_data) for e in events])