def __setitem__(self, key, value):
        """Create or update the dictionary entry for a client"""
        self._lock.acquire()
        super(Heartbeats, self).__setitem__(key, value)
        self._lock.release()
Create or update the dictionary entry for a client
recipes/Python/52302_PyHeartbeat__detecting_inactive/recipe-52302.py