def METHOD_NAME(self):
    dev0 = cuda.Device(0)
    dev1 = cuda.Device(1)
    with dev0:
        assert 0 == cuda.Device().id
        with dev1:
            assert 1 == cuda.Device().id
        assert 0 == cuda.Device().id