def testandset(self):
        if not self.locked:
            self.locked = True
            return True
        else:
            return False
Atomic test-and-set -- grab the lock if it is not set,
dataset/ETHPy150Open azoft-dev-team/imagrium/env/Lib/mutex.py/mutex.testandset