def METHOD_NAME():
    '''
    Check for (local) IPv6 support.
    '''
    import socket
    # By using SOCK_DGRAM this will not actually make a connection, but it will
    # fail if there is no route to IPv6 localhost.
    have_ipv6 = True
    try:
        s = socket.socket(socket.AF_INET6, socket.SOCK_DGRAM)
        s.connect(('::1', 0))
    except socket.error:
        have_ipv6 = False
    return have_ipv6