def METHOD_NAME(self):
    callback_event = threading.Event()
    def callback(stream, status, arg):
        self.assertIsNone(arg)
        callback_event.set()
    stream = cuda.stream()
    stream.add_callback(callback)
    self.assertTrue(callback_event.wait(1.0))