@staticmethod
def _lookup_ipaddr(ipaddr, networks):
    """
        Internal method for doing actual IP address lookup.
        """
    result = []
    for net in networks:
        if ipaddr.low() < net['first']:
            break
        if ipaddr.high() > net['last']:
            continue
        if ipaddr.low() >= net['first'] and ipaddr.high() <= net['last']:
            result.append(net)
    return result
