code: def extract_entity_attributes(match: Match) -> EntityAttributes:
      """Extract the entity attributes, i.e. type, value, etc., from the
      regex match.
  
      Args:
          match: Regex match to extract the entity attributes from.
  
      Returns:
          EntityAttributes object.
      """
      entity_text = match.groupdict()[GROUP_ENTITY_TEXT]
  
      if match.groupdict()[GROUP_ENTITY_DICT]:
          return extract_entity_attributes_from_dict(entity_text, match)
  
      entity_type = match.groupdict()[GROUP_ENTITY_TYPE]
  
      if match.groupdict()[GROUP_ENTITY_VALUE]:
          entity_value = match.groupdict()[GROUP_ENTITY_VALUE]
      else:
          entity_value = entity_text
  
      return EntityAttributes(
          entity_type, entity_value, entity_text, None, None
      )
  
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 2 for calling a global function with example usage: extract_entity_attributes(match) and returns: EntityAttributes, extract_entity_attributes_from_dict