class_docstr: Replaces non-input nodes during a fingerprint run.
docstr: Updates a `SchemaNode` to use a `FingerprintComponent`.
  
  This is for when we want to do a fingerprint run. During the fingerprint run we
  replace all non-input nodes with `FingerprintComponent`s so we can determine
  whether they are able to be pruned or cached before the next graph run without
  running the actual components.
  
  
  Args:
      node: The node to update.
      cache: The cache is needed to determine of there is cache hit for the
          fingerprint key.
docstr_tok: ["Updates","a","`","SchemaNode","`","to","use","a","`","FingerprintComponent","`",".","This","is","for","when","we","want","to","do","a","fingerprint","run",".","During","the","fingerprint","run","we","replace","all","non-input","nodes","with","`","FingerprintComponent","`","s","so","we","can","determine","whether","they","are","able","to","be","pruned","or","cached","before","the","next","graph","run","without","running","the","actual","components",".","Args",":","node",":","The","node","to","update",".","cache",":","The","cache","is","needed","to","determine","of","there","is","cache","hit","for","the","fingerprint","key","."]
code: def replace_schema_node(
      cls, node: SchemaNode, cache: TrainingCache
  ) -> None:
      """Updates a `SchemaNode` to use a `FingerprintComponent`.
  
      This is for when we want to do a fingerprint run. During the fingerprint run we
      replace all non-input nodes with `FingerprintComponent`s so we can determine
      whether they are able to be pruned or cached before the next graph run without
      running the actual components.
  
  
      Args:
          node: The node to update.
          cache: The cache is needed to determine of there is cache hit for the
              fingerprint key.
      """
      graph_component_class = node.uses
      node.uses = cls
      # We update the node to be "eager" so that `FingerprintComponent.run` sees
      # ALL the inputs to the node. If it was not eager, we would miss any args used
      # by the constructor.
      node.eager = True
      node.constructor_name = cls.create.__name__
      node.fn = cls.run.__name__
      node.config = {
          "config_of_replaced_component": node.config,
          "cache": cache,
          "graph_component_class": graph_component_class,
      }
  
imports: from __future__ import annotations
  from typing import Any, Dict, Optional, Text, Type
  import dataclasses
  import uuid
  from rasa.engine.caching import Cacheable, TrainingCache
  from rasa.engine.graph import ExecutionContext, GraphComponent, SchemaNode
  from rasa.engine.storage.resource import Resource
  from rasa.engine.storage.storage import ModelStorage
  from rasa.engine.training import fingerprinting
label_desc: Use image node_id 4 for calling the FingerprintComponent obj's underlying member method code with example usage: obj.replace_schema_node(cls, node, cache) without return types