code: def test_calling_put_on_actor_handle(ray_start_regular):
      @ray.remote
      class Counter:
          def __init__(self):
              self.x = 0
  
          def inc(self):
              self.x += 1
              return self.x
  
      @ray.remote
      def f():
          return Counter.remote()
  
      # Currently, calling ray.put on an actor handle is allowed, but is
      # there a good use case?
      counter = Counter.remote()
      counter_id = ray.put(counter)
      new_counter = ray.get(counter_id)
      assert ray.get(new_counter.inc.remote()) == 1
      assert ray.get(counter.inc.remote()) == 2
      assert ray.get(new_counter.inc.remote()) == 3
  
      ray.get(f.remote())
  
imports: import os
  import sys
  import time
  import numpy
  import pytest
  import ray
  import ray._private.gcs_utils
  from ray.util.state import list_actors
  import ray.cluster_utils
  from ray._private.test_utils import SignalActor, convert_actor_state, kill_actor_and_wait_for_failure, make_global_state_accessor, run_string_as_driver, wait_for_condition, wait_for_pid_to_exit
  from ray._private.ray_constants import gcs_actor_scheduling_enabled
  from ray.experimental.internal_kv import _internal_kv_get, _internal_kv_put
label_desc: Use image node_id 15 for calling a global function with example usage: test_calling_put_on_actor_handle(ray_start_regular) and returns: Counter, self