code: def test_putting_object_that_closes_over_object_ref(
      ray_start_shared_local_modes,
  ):
      # This test is here to prevent a regression of
      # https://github.com/ray-project/ray/issues/1317.
  
      class Foo:
          def __init__(self):
              self.val = ray.put(0)
  
          def method(self):
              f
  
      f = Foo()
      ray.put(f)
  
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 23 for calling a global function with example usage: test_putting_object_that_closes_over_object_ref(ray_start_shared_local_modes) without return types