code: def test_use_actor_twice(ray_start_10_cpus):
      # Make sure we can call the same actor using different refs.
  
      @ray.remote
      class Actor1:
          def __init__(self):
              self.count = 0
  
          def inc(self):
              self.count += 1
              return self.count
  
      @ray.remote
      class Actor2:
          def __init__(self):
              pass
  
          def inc(self, handle):
              return ray.get(handle.inc.remote())
  
      a = Actor1.remote()
      a2 = Actor2.remote()
      assert ray.get(a2.inc.remote(a)) == 1
      assert ray.get(a2.inc.remote(a)) == 2
  
imports: import datetime
  import os
  import random
  import sys
  import tempfile
  import numpy
  import pytest
  import ray
  from ray import cloudpickle
  from ray._private import ray_constants
  from ray._private.test_utils import client_test_enabled, wait_for_condition, wait_for_pid_to_exit
  from ray.actor import ActorClassInheritanceException
  from ray.tests.client_test_utils import create_remote_signal_actor
  from ray._private.test_utils import SignalActor
  import setproctitle
label_desc: Use image node_id 6 for calling a global function with example usage: test_use_actor_twice(ray_start_10_cpus) and returns: self, ray