@staticmethod
def choose_preferred_address(addr_list: Sequence[Tuple[(str, int, int)]]) -> Tuple[(str, int, int)]:
    assert (len(addr_list) >= 1)
    for (host, port, timestamp) in addr_list:
        if is_ip_address(host):
            return (host, port, timestamp)
    choice = random.choice(addr_list)
    return choice
@staticmethod
def choose_preferred_address(addr_list: Sequence[Tuple[(str, int, int)]]) -> Tuple[(str, int, int)]:
    assert (len(addr_list) >= 1)
    for (host, port, timestamp) in addr_list:
        if is_ip_address(host):
            return (host, port, timestamp)
    choice = random.choice(addr_list)
    return choice