import socket


def get_addr_info(addr):
    """Use getaddrinfo to lookup all addresses for each address.

    Returns a list of tuples or an empty list:
      [(family, address)]
    """
    results = set()
    try:
        tmp = socket.getaddrinfo(addr, 'www')
    except socket.gaierror:
        return []

    for el in tmp:
        results.add((el[0], el[4][0]))

    return results