code: def test_blocking_tasks(ray_start_regular):
      @ray.remote
      def f(i, j):
          return (i, j)
  
      @ray.remote
      def g(i):
          # Each instance of g submits and blocks on the result of another
          # remote task.
          object_refs = [f.remote(i, j) for j in range(2)]
          return ray.get(object_refs)
  
      @ray.remote
      def h(i):
          # Each instance of g submits and blocks on the result of another
          # remote task using ray.wait.
          object_refs = [f.remote(i, j) for j in range(2)]
          return ray.wait(object_refs, num_returns=len(object_refs))
  
      ray.get([h.remote(i) for i in range(4)])
  
      @ray.remote
      def _sleep(i):
          time.sleep(0.01)
          return i
  
      @ray.remote
      def sleep():
          # Each instance of sleep submits and blocks on the result of
          # another remote task, which takes some time to execute.
          ray.get([_sleep.remote(i) for i in range(10)])
  
      ray.get(sleep.remote())
  
file_path: ray/python/ray/tests/test_advanced_6.py
imports: import logging
  import os
  import platform
  import signal
  import sys
  import time
  import psutil
  import pytest
  import ray
  import ray.cluster_utils
  from ray._private.test_utils import run_string_as_driver_nonblocking, wait_for_condition, wait_for_pid_to_exit
label_desc: Use image node_id 4 for calling a global function with example usage: test_blocking_tasks(ray_start_regular) and returns: i,  j, ray, ray, i