code: def _nodes_are_equivalent(
      graph: "networkx.MultiDiGraph",
      node_a: int,
      node_b: int,
      max_history: int,
  ) -> bool:
      """Decides if two nodes are equivalent based on their fingerprints."""
      return graph.nodes[node_a]["label"] == graph.nodes[node_b][
          "label"
      ] and (
          _outgoing_edges_are_similar(graph, node_a, node_b)
          or _incoming_edges(graph, node_a)
          == _incoming_edges(graph, node_b)
          or _fingerprint_node(graph, node_a, max_history)
          == _fingerprint_node(graph, node_b, max_history)
      )
  
imports: from collections import defaultdict, deque
  import random
  from typing import Any, Text, List, Deque, Dict, Optional, Set, TYPE_CHECKING, Union, cast
  import rasa.shared.utils.io
  from rasa.shared.constants import INTENT_MESSAGE_PREFIX
  from rasa.shared.core.constants import ACTION_LISTEN_NAME
  from rasa.shared.core.domain import Domain
  from rasa.shared.core.events import UserUttered, ActionExecuted, Event
  from rasa.shared.core.generator import TrainingDataGenerator
  from rasa.shared.core.training_data.structures import StoryGraph, StoryStep
  from rasa.shared.nlu.constants import ENTITY_ATTRIBUTE_VALUE, INTENT, TEXT, ENTITY_ATTRIBUTE_TYPE, INTENT_NAME_KEY
label_desc: Use image node_id 5 for calling a global function with example usage: _nodes_are_equivalent(graph, node_a, node_b, max_history) and returns: unknown