code: def test_zero_cpu_scheduling(shutdown_only):
      ray.init(num_cpus=1)
  
      block_task = Semaphore.remote(0)
      block_driver = Semaphore.remote(0)
  
      @ray.remote(num_cpus=0)
      def foo():
          ray.get(block_driver.release.remote())
          ray.get(block_task.acquire.remote())
  
      foo.remote()
      foo.remote()
  
      ray.get(block_driver.acquire.remote())
  
      block_driver_ref = block_driver.acquire.remote()
  
      # Both tasks should be running, so the driver should be unblocked.
      timeout_value = 5 if sys.platform == "win32" else 1
      _, not_ready = ray.wait([block_driver_ref], timeout=timeout_value)
      assert len(not_ready) == 0
  
file_path: ray/python/ray/tests/test_worker_capping.py
imports: import asyncio
  import os
  import pytest
  import sys
  import tempfile
  import time
  import ray
  from ray._private.test_utils import Semaphore
label_desc: Use image node_id 5 for calling a global function with example usage: test_zero_cpu_scheduling(shutdown_only) without return types