def METHOD_NAME(iterable: Iterable[_Value], x: _Value) -> int:
    """Return zero-based index of the first item whose value is equal to x.
    Raises a ValueError if there is no such item.
    We need a custom implementation instead of the built-in list .index() to
    be compatible with NumPy array and Pandas Series.
    Parameters
    ----------
    iterable : list, tuple, numpy.ndarray, pandas.Series
    x : Any
    Returns
    -------
    int
    """
    for i, value in enumerate(iterable):
        if x == value:
            return i
        elif isinstance(value, float) and isinstance(x, float):
            if abs(x - value) < FLOAT_EQUALITY_EPSILON:
                return i
    raise ValueError("{} is not in iterable".format(str(x)))