def _get_prefix_length(number1, number2, bits):
    for i in range(bits):
        if number1 >> i == number2 >> i:
            return bits - i
    return 0
Get the number of leading bits that are same for two numbers.
dataset/ETHPy150Open anandology/pyjamas/pyjs/src/pyjs/lib/ipaddr.py/_get_prefix_length