def check_ipv4_addrs(ips):
    assert isinstance(ips, list)
    invalid_ips = []
    for ip in ips:
        try:
            socket.inet_pton(socket.AF_INET, str(ip))
        except __HOLE__:
            invalid_ips.append(ip)
    assert not len(invalid_ips), ('Only IPv4 values are allowed. The following are invalid IPv4 addresses: '
                                  '{}'.format(invalid_ips))
dataset/ETHPy150Open dcos/dcos/ssh/validate.py/check_ipv4_addrs