'Checks if a node still holds the lock.
:returns: True if a node still holds the lock, False otherwise.
:rtype: bool'

def holds_lock(self):

    if (self.processing_element is None):
        return False
    (lock_id, _) = self.processing_element
    lock_path = '{path}/{id}'.format(path=self._lock_path, id=lock_id)
    self.client.sync(lock_path)
    (value, stat) = self.client.retry(self.client.get, lock_path)
    return (value == self.id)
