def _find_by_prior_token(tokens, keys):
    """
    If any key in keys appears in tokens, return the token following said key.
    If more than one key in keys matches, use the first matching key in keys.
    Otherwise, return None.
    """
    # Determine which key matches
    match_key = None
    for key in keys:
        if key in tokens:
            match_key = key
            break
    else:
        return None

    # Determine the index of the following token
    index = tokens.index(match_key) + 1
    if index >= len(tokens):
        return None
    return tokens[index]