code: def test_node_accessors(shared_ray_instance):
      @ray.remote
      def a(*a, **kw):
          pass
  
      tmp1 = a.bind()
      tmp2 = a.bind()
      tmp3 = a.bind()
      node = a.bind(1, tmp1, x=tmp2, y={"foo": tmp3})
      assert node.get_args() == (1, tmp1)
      assert node.get_kwargs() == {"x": tmp2, "y": {"foo": tmp3}}
      assert node._get_toplevel_child_nodes() == [tmp1, tmp2]
      assert node._get_all_child_nodes() == [tmp1, tmp2, tmp3]
  
      tmp4 = a.bind()
      tmp5 = a.bind()
      replace = {tmp1: tmp4, tmp2: tmp4, tmp3: tmp5}
      n2 = node._apply_and_replace_all_child_nodes(lambda x: replace[x])
      assert n2._get_all_child_nodes() == [tmp4, tmp5]
  
file_path: ray/python/ray/dag/tests/test_function_dag.py
imports: import pytest
  import ray
label_desc: Use image node_id 4 for calling a global function with example usage: test_node_accessors(shared_ray_instance) without return types