code: def extract_entity_attributes_from_dict(
      entity_text: Text, match: Match
  ) -> EntityAttributes:
      """Extract entity attributes from dict format.
  
      Args:
          entity_text: Original entity text.
          match: Regex match.
  
      Returns:
          Extracted entity attributes.
      """
      entity_dict_str = match.groupdict()[GROUP_ENTITY_DICT]
      entity_dict = get_validated_dict(entity_dict_str)
      return EntityAttributes(
          entity_dict.get(ENTITY_ATTRIBUTE_TYPE),
          entity_dict.get(ENTITY_ATTRIBUTE_VALUE, entity_text),
          entity_text,
          entity_dict.get(ENTITY_ATTRIBUTE_GROUP),
          entity_dict.get(ENTITY_ATTRIBUTE_ROLE),
      )
  
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 3 for calling a global function with example usage: extract_entity_attributes_from_dict(entity_text, match) and returns: EntityAttributes