def last_in_set(seq, items):
    """Returns index of last occurrence of any of items in seq, or None.
    
    NOTE: We could do this slightly more efficiently by iterating over s in
    reverse order, but then it wouldn't work on generators that can't be
    reversed.
    """
    found = None
    for s in seq:
        if s in items:
            found = s
    return found