class_docstr: Instantiates and runs a `GraphComponent` within a graph.
  
  A `GraphNode` is a wrapper for a `GraphComponent` that allows it to be executed
  in the context of a graph. It is responsible for instantiating the component at the
  correct time, collecting the inputs from the parent nodes, running the run function
  of the component and passing the output onwards.
class_docstr_tok: ["Instantiates","and","runs","a","`","GraphComponent","`","within","a","graph",".","A","`","GraphNode","`","is","a","wrapper","for","a","`","GraphComponent","`","that","allows","it","to","be","executed","in","the","context","of","a","graph",".","It","is","responsible","for","instantiating","the","component","at","the","correct","time",",","collecting","the","inputs","from","the","parent","nodes",",","running","the","run","function","of","the","component","and","passing","the","output","onwards","."]
docstr: Initializes `GraphNode`.
  
  Args:
      node_name: The name of the node in the schema.
      component_class: The class to be instantiated and run.
      constructor_name: The method used to instantiate the component.
      component_config: Config to be passed to the component.
      fn_name: The function on the instantiated `GraphComponent` to be run when
          the node executes.
      inputs: A map from input name to parent node name that provides it.
      eager: Determines if the node is instantiated right away, or just before
          being run.
      model_storage: Storage which graph components can use to persist and load
          themselves.
      resource: If given the `GraphComponent` will be loaded from the
          `model_storage` using the given resource.
      execution_context: Information about the current graph run.
      hooks: These are called before and after execution.
code: def __init__(
      self,
      node_name: Text,
      component_class: Type[GraphComponent],
      constructor_name: Text,
      component_config: Dict[Text, Any],
      fn_name: Text,
      inputs: Dict[Text, Text],
      eager: bool,
      model_storage: ModelStorage,
      resource: Optional[Resource],
      execution_context: ExecutionContext,
      hooks: Optional[List[GraphNodeHook]] = None,
  ) -> None:
      """Initializes `GraphNode`.
  
      Args:
          node_name: The name of the node in the schema.
          component_class: The class to be instantiated and run.
          constructor_name: The method used to instantiate the component.
          component_config: Config to be passed to the component.
          fn_name: The function on the instantiated `GraphComponent` to be run when
              the node executes.
          inputs: A map from input name to parent node name that provides it.
          eager: Determines if the node is instantiated right away, or just before
              being run.
          model_storage: Storage which graph components can use to persist and load
              themselves.
          resource: If given the `GraphComponent` will be loaded from the
              `model_storage` using the given resource.
          execution_context: Information about the current graph run.
          hooks: These are called before and after execution.
      """
      self._node_name: Text = node_name
      self._component_class: Type[GraphComponent] = component_class
      self._constructor_name: Text = constructor_name
      self._constructor_fn: Callable = getattr(
          self._component_class, self._constructor_name
      )
      self._component_config: Dict[
          Text, Any
      ] = rasa.utils.common.override_defaults(
          self._component_class.get_default_config(), component_config
      )
      self._fn_name: Text = fn_name
      self._fn: Callable = getattr(self._component_class, self._fn_name)
      self._inputs: Dict[Text, Text] = inputs
      self._eager: bool = eager
  
      self._model_storage = model_storage
      self._existing_resource = resource
  
      self._execution_context: ExecutionContext = dataclasses.replace(
          execution_context, node_name=self._node_name
      )
  
      self._hooks: List[GraphNodeHook] = hooks if hooks else []
  
      self._component: Optional[GraphComponent] = None
      if self._eager:
          self._load_component()
  
imports: from __future__ import annotations
  import dataclasses
  from abc import ABC, abstractmethod
  from dataclasses import dataclass, field
  import logging
  from typing import Any, Callable, Dict, List, Optional, Text, Type, Tuple, Union
  from rasa.engine.exceptions import GraphComponentException, GraphRunError, GraphSchemaException
  import rasa.shared.utils.common
  import rasa.utils.common
  from rasa.engine.storage.resource import Resource
  from rasa.engine.storage.storage import ModelStorage
  from rasa.shared.exceptions import InvalidConfigException, RasaException
  from rasa.shared.data import TrainingType
label_desc: Use image node_id 1 to create a new GraphNode object  with example: obj = GraphNode(node_name, component_class, constructor_name, component_config, fn_name, inputs, eager, model_storage, resource, execution_context, hooks)