def is_valid_ipv6(ip_str):
    try:
        socket.inet_pton(socket.AF_INET6, ip_str)
    except socket.error:
        return False
    return True
set up the object from pickled data
dataset/ETHPy150Open un33k/django-ipware/ipware/utils.py/is_valid_ipv6--crossover with--dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/python-ldap-2.3.13/Lib/ldap/ldapobject.py/ReconnectLDAPObject.__setstate__