code: def _remove_auxiliary_nodes(
      graph: "networkx.MultiDiGraph", special_node_idx: int
  ) -> None:
      """Remove any temporary or unused nodes."""
      graph.remove_node(TMP_NODE_ID)
  
      if not graph.predecessors(END_NODE_ID):
          graph.remove_node(END_NODE_ID)
  
      # remove duplicated "..." nodes after merging
      predecessors_seen = set()
      for i in range(special_node_idx + 1, TMP_NODE_ID):
          predecessors = graph.predecessors(i)
          for pred in predecessors:
              if pred in predecessors_seen:
                  graph.remove_node(i)
          predecessors_seen.update(predecessors)
  
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 17 for calling a global function with example usage: _remove_auxiliary_nodes(graph, special_node_idx) without return types