code: def test_basic_task_dag(shared_ray_instance):
      ct = Counter.remote()
  
      @ray.remote
      def a():
          ray.get(ct.inc.remote())
          return 2
  
      @ray.remote
      def b(x):
          ray.get(ct.inc.remote())
          return x * 2
  
      @ray.remote
      def c(x):
          ray.get(ct.inc.remote())
          return x + 1
  
      @ray.remote
      def d(x, y):
          ray.get(ct.inc.remote())
          return x + y
  
      a_ref = a.bind()
      b_ref = b.bind(a_ref)
      c_ref = c.bind(a_ref)
      d_ref = d.bind(b_ref, c_ref)
      d1_ref = d.bind(d_ref, d_ref)
      d2_ref = d.bind(d1_ref, d_ref)
      dag = d.bind(d2_ref, d_ref)
      print(dag)
  
      assert ray.get(dag.execute()) == 28
      assert ray.get(ct.get.remote()) == 7
  
file_path: ray/python/ray/dag/tests/test_function_dag.py
imports: import pytest
  import ray
label_desc: Use image node_id 1 for calling a global function with example usage: test_basic_task_dag(shared_ray_instance) and returns: int, unknown, unknown, unknown