code: def test_first_completed(self):
      manager = worker_manager.WorkerManager(register_in_thread=True)
      self.addCleanup(manager.cleanup_after_test, self)
      quick_done = threading.Event()
      slow_done = threading.Event()
      slow_can_start = threading.Event()
  
      def quick():
          quick_done.set()
  
      def slow():
          slow_can_start.wait()
          slow_done.set()
  
      colo_node = lp.MultiThreadingColocation(
          [lp.PyNode(quick), lp.PyNode(slow)],
          return_on_first_completed=True,
      )
      colo_node.run()  # Returns immediately without waiting for the slow node.
      self.assertTrue(quick_done.is_set())
      self.assertFalse(slow_done.is_set())
  
      # Let the slow one finish.
      slow_can_start.set()
      slow_done.wait()
  
file_path: launchpad/launchpad/nodes/multi_threading_colocation/node_test.py
imports: import threading
  from absl.testing import absltest
  import courier
  import launchpad
  from launchpad.launch import worker_manager
label_desc: Use image node_id 4 for calling the NodeTest obj's underlying member method code with example usage: obj.test_first_completed() without return types