async def METHOD_NAME(dest_ips, timeout=2, count=5, psize=64, display=None):
    """
    Send `count' ping with `psize' size to `dest_addr' with
    the given `timeout' and display the result.
    """
    if not display:
        return
    result = {}
    ips = generate_ips(dest_ips)
    await display(f'Total valid address: {len(ips)}\r\n')
    for dest_ip in ips:
        await display(f'PING {dest_ip}: 56 data bytes')
        # 切换异步协程
        await asyncio.sleep(0.01)
        error_count = 0
        for i in range(count):
            try:
                delay = ping(dest_ip, timeout, psize)
            except socket.gaierror as e:
                await display("Failed (socket error: '%s')" % str(e))
                error_count += 1
                break
            if delay is None:
                await display("Request timeout for icmp_seq %i" % i)
                error_count += 1
            else:
                delay *= 1000
                await display("64 bytes from %s: time=%.3f ms" % (dest_ip, delay))
            await asyncio.sleep(1)
        # 只要有包通过，就认为address是通的
        result[dest_ip] = 'failed' if error_count == count else 'ok'
        await display(f'{count} packets transmitted, '
                      f'{count - error_count} packets received, '
                      f'{(error_count / count) * 100}% packet loss\r\n')
    await display(f'----- Ping statistics -----')
    for k, v in result.items():
        await display(f'{k}: {v}')