'Checks for timed out entries'

def _check_timeouts(self):

    for macEntry in self.entryByMAC.values():
        entryPinged = False
        for (ip_addr, ipEntry) in macEntry.ipAddrs.items():
            if ipEntry.expired():
                if ipEntry.pings.failed():
                    del macEntry.ipAddrs[ip_addr]
                    log.info('Entry    %s:    IP    address    %s    expired', str(macEntry), str(ip_addr))
                else:
                    self.sendPing(macEntry, ip_addr)
                    ipEntry.pings.sent()
                    entryPinged = True
        if (macEntry.expired() and (not entryPinged)):
            log.info('Entry    %s    expired', str(macEntry))
            if (len(macEntry.ipAddrs) > 0):
                for ip in macEntry.ipAddrs.keys():
                    log.warning('Entry    %s    expired    but    still    had    IP    address    %s', str(macEntry), str(ip_addr))
                    del macEntry.ipAddrs[ip_addr]
            self.raiseEventNoErrors(HostEvent, macEntry, leave=True)
            del self.entryByMAC[macEntry.macaddr]
