def is_ipv4(ip_str):
    try:
        addr = ipaddr.IPAddress(ip_str)
        return addr.version == 4
    except:
        return False
Args:
dataset/ETHPy150Open StackStorm/st2/st2common/st2common/util/ip_utils.py/is_ipv4--crossover with--dataset/ETHPy150Open Exa-Networks/exabgp/lib/exabgp/dep/ipaddress.py/IPv4Address.__init__