Thanx for your comment and I know why we need to use ARP cache here.

But, yes, sometimes there is some invalid info in the cache. And sometimes this delay occur in
other situations rather than vm shutdown.

Hmmm, there is an idea that maybe we can add a more verify if ip&mac is in ARP cache.
Example:
    ip_map = parse_arp()
    for mac in macs:
        if ip_map.get(mac) == ip:
            s, _ = utils_test.ping(ip):
            if s:
                 return False
            return True