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: Calls the `GraphComponent` run method when the node executes in the graph.
  
  Args:
      *inputs_from_previous_nodes: The output of all parent nodes. Each is a
          dictionary with a single item mapping the node's name to its output.
          If the node couldn't be resolved and has no output, the node name is
          provided instead of a tuple.
  
  Returns:
      The node name and its output.
code: def __call__(
      self, *inputs_from_previous_nodes: Union[Tuple[Text, Any], Text]
  ) -> Tuple[Text, Any]:
      """Calls the `GraphComponent` run method when the node executes in the graph.
  
      Args:
          *inputs_from_previous_nodes: The output of all parent nodes. Each is a
              dictionary with a single item mapping the node's name to its output.
              If the node couldn't be resolved and has no output, the node name is
              provided instead of a tuple.
  
      Returns:
          The node name and its output.
      """
      # filter out arguments that dask couldn't lookup
      received_inputs: Dict[Text, Any] = {}
      for i in inputs_from_previous_nodes:
          if isinstance(i, tuple):
              node_name, node_output = i
              received_inputs[node_name] = node_output
          else:
              logger.warning(
                  f"Node '{i}' was not resolved, there is no putput. "
                  f"Another component should have provided this as an "
                  f"output."
              )
  
      kwargs = {}
      for input_name, input_provider_node_name in self._inputs.items():
          if input_provider_node_name not in received_inputs:
              raise GraphRunError(
                  f"Missing input to run node '{self._node_name}'. "
                  f"Expected input '{input_provider_node_name}' to "
                  f"provide parameter '{input_name}'."
              )
          kwargs[input_name] = received_inputs[input_provider_node_name]
  
      input_hook_outputs = self._run_before_hooks(kwargs)
  
      if not self._eager:
          constructor_kwargs = rasa.shared.utils.common.minimal_kwargs(
              kwargs, self._constructor_fn
          )
          self._load_component(**constructor_kwargs)
          run_kwargs = {
              k: v
              for k, v in kwargs.items()
              if k not in constructor_kwargs
          }
      else:
          run_kwargs = kwargs
  
      logger.debug(
          f"Node '{self._node_name}' running "
          f"'{self._component_class.__name__}.{self._fn_name}'."
      )
  
      try:
          output = self._fn(self._component, **run_kwargs)
      except InvalidConfigException:
          # Pass through somewhat expected exception to allow more fine granular
          # handling of exceptions.
          raise
      except Exception as e:
          if not isinstance(e, RasaException):
              raise GraphComponentException(
                  f"Error running graph component for node {self._node_name}."
              ) from e
          else:
              logger.error(
                  f"Error running graph component for node {self._node_name}."
              )
              raise
  
      self._run_after_hooks(input_hook_outputs, output)
  
      return self._node_name, output
  
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 4 for calling the GraphNode obj's underlying member method code with example usage: obj.__call__() and returns: self,  output