code: def test_dag_errors(ray_start_regular):
      a = Actor.remote(0)
      dag = a.inc.bind(1)
      with pytest.raises(
          NotImplementedError,
          match="Compiled DAGs currently require exactly one InputNode",
      ):
          dag.experimental_compile()
  
      a2 = Actor.remote(0)
      with InputNode() as inp:
          dag = MultiOutputNode([a.inc.bind(inp), a2.inc.bind(1)])
      with pytest.raises(
          ValueError,
          match="Compiled DAGs require each task to take a ray.dag.InputNode or "
          "at least one other DAGNode as an input",
      ):
          dag.experimental_compile()
  
      @ray.remote
      def f(x):
          return x
  
      with InputNode() as inp:
          dag = f.bind(inp)
      with pytest.raises(
          NotImplementedError,
          match="Compiled DAGs currently only support actor method nodes",
      ):
          dag.experimental_compile()
  
      with InputNode() as inp:
          dag = a.inc.bind(inp)
          dag = a.inc.bind(dag)
      with pytest.raises(
          NotImplementedError,
          match="Compiled DAGs can contain at most one task per actor handle.",
      ):
          dag.experimental_compile()
  
      with InputNode() as inp:
          dag = a.inc_two.bind(inp[0], inp[1])
      with pytest.raises(
          NotImplementedError,
          match="Compiled DAGs currently do not support kwargs or multiple args "
          "for InputNode",
      ):
          dag.experimental_compile()
  
      with InputNode() as inp:
          dag = a.inc_two.bind(inp.x, inp.y)
      with pytest.raises(
          NotImplementedError,
          match="Compiled DAGs currently do not support kwargs or multiple args "
          "for InputNode",
      ):
          dag.experimental_compile()
  
imports: import logging
  import os
  import random
  import sys
  import time
  import pytest
  import ray
  import ray.cluster_utils
  from ray.exceptions import RaySystemError
  from ray.dag import InputNode, MultiOutputNode
  from ray.tests.conftest import *
label_desc: Use image node_id 6 for calling a global function with example usage: test_dag_errors(ray_start_regular) and returns: x