code: def test_ray_recursive_objects(ray_start_shared_local_modes):
      class ClassA:
          pass
  
      # Make a list that contains itself.
      lst = []
      lst.append(lst)
      # Make an object that contains itself as a field.
      a1 = ClassA()
      a1.field = a1
      # Make two objects that contain each other as fields.
      a2 = ClassA()
      a3 = ClassA()
      a2.field = a3
      a3.field = a2
      # Make a dictionary that contains itself.
      d1 = {}
      d1["key"] = d1
      # Create a list of recursive objects.
      recursive_objects = [lst, a1, a2, a3, d1]
  
      # Serialize the recursive objects.
      for obj in recursive_objects:
          ray.put(obj)
  
imports: import logging
  import os
  import pickle
  import random
  import sys
  import time
  import pytest
  import ray
  import ray.cluster_utils
  from ray._private.test_utils import SignalActor, client_test_enabled, get_error_message, run_string_as_driver
label_desc: Use image node_id 21 for calling a global function with example usage: test_ray_recursive_objects(ray_start_shared_local_modes) without return types