def METHOD_NAME(self):
    def switch_gpu():
        with cuda.gpus[1]:
            return cuda.current_context().device.id
    with cuda.gpus[0]:
        devid = switch_gpu()
    self.assertEqual(int(devid), 1)