def _lock_file(id):
    # /tmp is cleared on reboot on many systems, but it doesn't have to be
    if os.path.exists('/dev/shm'):
        # /dev/shm on linux machines is a RAM disk, so is definitely cleared
        return '/dev/shm/gpu_lock_%d' % id
    else:
        return '/tmp/gpu_lock_%d' % id
check if tree violates any sanity check
dataset/ETHPy150Open nitishsrivastava/deepnet/cudamat/gpu_lock2.py/_lock_file--crossover with--dataset/ETHPy150Open balajiln/mondrianforest/src/mondrianforest.py/MondrianTree.check_tree