code: def test_actor_recursive(ray_start_regular_shared):
      @ray.remote
      class Actor:
          def __init__(self, delegate=None):
              self.delegate = delegate
  
          def f(self, x):
              if self.delegate:
                  return ray.get(self.delegate.f.remote(x))
              return x * 2
  
      a = Actor.remote()
      b = Actor.remote(a)
      c = Actor.remote(b)
  
      result = ray.get([c.f.remote(i) for i in range(100)])
      assert result == [x * 2 for x in range(100)]
  
      result, _ = ray.wait(
          [c.f.remote(i) for i in range(100)], num_returns=100
      )
      result = ray.get(result)
      assert result == [x * 2 for x in range(100)]
  
imports: import array
  import logging
  import os
  import random
  import subprocess
  import sys
  import tempfile
  import threading
  import time
  from unittest.mock import MagicMock, patch
  import pytest
  from ray._private.ray_constants import KV_NAMESPACE_FUNCTION_TABLE
  from ray._private.test_utils import client_test_enabled
  from ray.cluster_utils import Cluster, cluster_not_supported
  from ray.exceptions import GetTimeoutError, RayTaskError
  from ray.tests.client_test_utils import create_remote_signal_actor
label_desc: Use image node_id 16 for calling a global function with example usage: test_actor_recursive(ray_start_regular_shared) and returns: unknown, ray