def __contains__(self, other):
        if isinstance(other, BaseIP):
            if self._module.version != other._module.version:
                return False
            if isinstance(other, IPAddress):
                return other._value >= self.first and other._value <= self.last
            # Assume that we (and the other) provide .first and .last.
            return other.first >= self.first and other.last <= self.last

        # Whatever it is, try to interpret it as IPAddress.
        return IPAddress(other) in self
:param other: an `IPAddress` or ranged IP object.
dataset/ETHPy150Open drkjam/netaddr/netaddr/ip/__init__.py/IPListMixin.__contains__