def leftover(self):
        if self.duration is None:
            return None
        else:
            elapsed = now() - self.started_at
            return max(0, self.duration - elapsed)
dataset/ETHPy150Open python-zk/kazoo/kazoo/recipe/lock.py/_Watch.leftover/original