def random_ipv4_prefix():
    prefixlen = random.randrange(32)
    int_ip = random.randrange(IPy.MAX_IPV4_ADDRESS)
    int_ip &= 0xffffffff << (32-prefixlen)
    return IPy.IP('.'.join(map(str, (int_ip >> 24,
                                    (int_ip >> 16) & 0xff,
                                    (int_ip >> 8) & 0xff,
                                    int_ip & 0xff)))
                           + '/%d' % prefixlen)

# tests
dataset/ETHPy150Open autocracy/python-ipy/test/test_fuzz.py/random_ipv4_prefix/original