def is_private_addr(x):
    """Returns True if the IPv4 Address is an RFC 1918 private address."""
    paddrs = ['10.0.0.0/8', '172.16.0.0/12', '192.168.0.0/16']
    found = False
    for ipr in paddrs:
        try:
            if ipaddress.ip_address(x) in ipaddress.ip_network(ipr):
                found = True
                continue
        except:
            break
    return found
Returns True if the IPv4 Address is an RFC 1918 private address.