def is_ipv6(addr):
    try:
        socket.inet_pton(socket.AF_INET6, addr)
        return True
    except socket.error:
        return False


# [START example]
Generate a dictionary representation of a user, optionally including # projects shared with `current_user`
dataset/ETHPy150Open GoogleCloudPlatform/python-docs-samples/managed_vms/datastore/main.py/is_ipv6--crossover with--dataset/ETHPy150Open CenterForOpenScience/osf.io/website/profile/utils.py/add_contributor_json