class_docstr: Represents partial access of user input based on an index (int),
   object attribute or dict key (str).
  
  Examples:
  
      .. code-block:: python
  
          with InputNode() as dag_input:
              a = dag_input[0]
              b = dag_input.x
              ray_dag = add.bind(a, b)
  
          # This makes a = 1 and b = 2
          ray_dag.execute(1, x=2)
  
          with InputNode() as dag_input:
              a = dag_input[0]
              b = dag_input[1]
              ray_dag = add.bind(a, b)
  
          # This makes a = 2 and b = 3
          ray_dag.execute(2, 3)
  
          # Alternatively, you can input a single object
          # and the inputs are automatically indexed from the object:
          # This makes a = 2 and b = 3
          ray_dag.execute([2, 3])
class_docstr_tok: ["Represents","partial","access","of","user","input","based","on","an","index","(","int",")",",","object","attribute","or","dict","key","(","str",")",".","Examples",":","..","code-block",":",":","python","with","InputNode","(",")","as","dag_input",":","a","=","dag_input","[","0","]","b","=","dag_input.x","ray_dag","=","add.bind","(","a",",","b",")","#","This","makes","a","=","1","and","b","=","2","ray_dag.execute","(","1",",","x=2",")","with","InputNode","(",")","as","dag_input",":","a","=","dag_input","[","0","]","b","=","dag_input","[","1","]","ray_dag","=","add.bind","(","a",",","b",")","#","This","makes","a","=","2","and","b","=","3","ray_dag.execute","(","2",",","3",")","#","Alternatively",",","you","can","input","a","single","object","#","and","the","inputs","are","automatically","indexed","from","the","object",":","#","This","makes","a","=","2","and","b","=","3","ray_dag.execute","(","[","2",",","3","]",")"]
code: def __init__(
      self,
      dag_input_node: InputNode,
      key: str,
      accessor_method: str,
      input_type: str = None,
  ):
      self._dag_input_node = dag_input_node
      self._key = key
      self._accessor_method = accessor_method
      super().__init__(
          [],
          {},
          {},
          {
              "dag_input_node": dag_input_node,
              "key": key,
              "accessor_method": accessor_method,
              # Type of the input tied to this node. Used by
              # gradio_visualize_graph.GraphVisualizer to determine which Gradio
              # component should be used for this node.
              "result_type_string": input_type,
          },
      )
  
imports: from typing import Any, Dict, List, Union, Optional
  from ray.dag import DAGNode
  from ray.dag.format_utils import get_dag_node_str
  from ray.experimental.gradio_utils import type_to_string
  from ray.util.annotations import DeveloperAPI
label_desc: Use image node_id 1 to create a new InputAttributeNode object from inherited base classes: DAGNode with example: obj = InputAttributeNode(dag_input_node, key, accessor_method, input_type)