code: def replace_entities(training_example: Text) -> Text:
      """Replace special symbols related to the entities in the provided
         training example.
  
      Args:
          training_example: Original training example with special symbols.
  
      Returns:
          String with removed special symbols.
      """
      return re.sub(
          ENTITY_REGEX,
          lambda m: m.groupdict()[GROUP_ENTITY_TEXT],
          training_example,
      )
  
file_path: rasa/rasa/shared/nlu/training_data/entities_parser.py
imports: import re
  from json import JSONDecodeError
  from typing import Text, List, Dict, Match, Optional, NamedTuple, Any
  import logging
  import rasa.shared.nlu.training_data.util
  from rasa.shared.constants import DOCS_URL_TRAINING_DATA_NLU
  from rasa.shared.exceptions import InvalidEntityFormatException
  from rasa.shared.nlu.constants import ENTITY_ATTRIBUTE_VALUE, ENTITY_ATTRIBUTE_TYPE, ENTITY_ATTRIBUTE_GROUP, ENTITY_ATTRIBUTE_ROLE
  from rasa.shared.nlu.training_data.message import Message
label_desc: Use image node_id 5 for calling a global function with example usage: replace_entities(training_example) and returns: re