code: def test_class_as_class_constructor_arg(shared_ray_instance):
      @ray.remote
      class OuterActor:
          def __init__(self, inner_actor):
              self.inner_actor = inner_actor
  
          def inc(self, x):
              self.inner_actor.inc.remote(x)
  
          def get(self):
              return ray.get(self.inner_actor.get.remote())
  
      outer = OuterActor.bind(Actor.bind(10))
      outer.inc.bind(2)
      dag = outer.get.bind()
      print(dag)
      assert ray.get(dag.execute()) == 12
  
imports: import pytest
  import ray
  from ray.dag import PARENT_CLASS_NODE_KEY, PREV_CLASS_METHOD_CALL_KEY
label_desc: Use image node_id 2 for calling a global function with example usage: test_class_as_class_constructor_arg(shared_ray_instance) and returns: ray