def METHOD_NAME(self, value):
    """Return the 0-based position of integer `value` in
    the sequence this range represents."""
    try:
        diff = value - self._start
    except TypeError:
        raise ValueError('%r is not in range' % value)
    quotient, remainder = divmod(diff, self._step)
    if remainder == 0 and 0 <= quotient < self._len:
        return abs(quotient)
    raise ValueError('%r is not in range' % value)