code: def _add_edge(
      graph: "networkx.MultiDiGraph",
      u: int,
      v: int,
      key: Optional[Text],
      label: Optional[Text] = None,
      **kwargs: Any,
  ) -> None:
      """Adds an edge to the graph if the edge is not already present. Uses the
      label as the key.
      """
      if key is None:
          key = EDGE_NONE_LABEL
  
      if key == EDGE_NONE_LABEL:
          label = ""
  
      if not graph.has_edge(u, v, key=EDGE_NONE_LABEL):
          graph.add_edge(u, v, key=key, label=label, **kwargs)
      else:
          d = graph.get_edge_data(u, v, key=EDGE_NONE_LABEL)
          _transfer_style(kwargs, d)
  
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 6 for calling a global function with example usage: _add_edge(graph, u, v, key, label) without return types