code: def test_basic_task_dag_with_options(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.options(name="b", num_returns=1).bind(a_ref)
      c_ref = c.options(name="c", max_retries=3).bind(a_ref)
      dag = d.options(name="d", num_cpus=2).bind(b_ref, c_ref)
  
      print(dag)
  
      assert ray.get(dag.execute()) == 7
      assert ray.get(ct.get.remote()) == 4
  
      assert b_ref.get_options().get("name") == "b"
      assert b_ref.get_options().get("num_returns") == 1
      assert c_ref.get_options().get("name") == "c"
      assert c_ref.get_options().get("max_retries") == 3
      assert dag.get_options().get("name") == "d"
      assert dag.get_options().get("num_cpus") == 2
  
file_path: ray/python/ray/dag/tests/test_function_dag.py
imports: import pytest
  import ray
label_desc: Use image node_id 2 for calling a global function with example usage: test_basic_task_dag_with_options(shared_ray_instance) and returns: int, unknown, unknown, unknown