code: def test_captured_object_ref(one_worker_100MiB):
      captured_id = ray.put(np.zeros(10 * 1024 * 1024, dtype=np.uint8))
  
      @ray.remote
      def f(signal):
          ray.get(signal.wait.remote())
          ray.get(captured_id)  # noqa: F821
  
      signal = SignalActor.remote()
      obj_ref = f.remote(signal)
  
      # Delete local references.
      del f
      del captured_id
  
      # Test that the captured object ref is pinned despite having no local
      # references.
      ray.get(signal.send.remote())
      _fill_object_store_and_get(obj_ref)
  
      captured_id = ray.put(np.zeros(10 * 1024 * 1024, dtype=np.uint8))
  
      @ray.remote
      class Actor:
          def get(self, signal):
              ray.get(signal.wait.remote())
              ray.get(captured_id)  # noqa: F821
  
      signal = SignalActor.remote()
      actor = Actor.remote()
      obj_ref = actor.get.remote(signal)
  
      # Delete local references.
      del Actor
      del captured_id
  
      # Test that the captured object ref is pinned despite having no local
      # references.
      ray.get(signal.send.remote())
      _fill_object_store_and_get(obj_ref)
  
imports: import copy
  import logging
  import os
  import sys
  import time
  import numpy
  import pytest
  import ray
  import ray._private.gcs_utils
  import ray.cluster_utils
  from ray._private.test_utils import SignalActor, convert_actor_state, kill_actor_and_wait_for_failure, put_object, wait_for_condition, skip_flaky_core_test_premerge
label_desc: Use image node_id 11 for calling a global function with example usage: test_captured_object_ref(one_worker_100MiB) without return types