from operator import eq


def in_(x, seq):
    """
    Evaluates if x is in seq, avoiding issues such as these:

    >>> s = pd.Series([1,2,3])
    >>> with pytest.raises(ValueError):
    >>>     s in [None]    
    >>> assert not in_(s, [None])
    >>> assert in_(s, [None, s])    
    """
    for s in seq:
        if eq(x, s):
            return True
    return False