code: def build_entity(
      start: int,
      end: int,
      value: Text,
      entity_type: Text,
      role: Optional[Text] = None,
      group: Optional[Text] = None,
      **kwargs: Any,
  ) -> Dict[Text, Any]:
      """Builds a standard entity dictionary.
  
      Adds additional keyword parameters.
  
      Args:
          start: start position of entity
          end: end position of entity
          value: text value of the entity
          entity_type: name of the entity type
          role: role of the entity
          group: group of the entity
          **kwargs: additional parameters
  
      Returns:
          an entity dictionary
      """
      entity = {
          ENTITY_ATTRIBUTE_START: start,
          ENTITY_ATTRIBUTE_END: end,
          ENTITY_ATTRIBUTE_VALUE: value,
          ENTITY_ATTRIBUTE_TYPE: entity_type,
      }
  
      if role:
          entity[ENTITY_ATTRIBUTE_ROLE] = role
      if group:
          entity[ENTITY_ATTRIBUTE_GROUP] = group
  
      entity.update(kwargs)
      return entity
  
imports: import json
  import logging
  import os
  import re
  from typing import Any, Dict, Optional, Text, Match, List
  import scipy.sparse
  from rasa.shared.nlu.constants import ENTITIES, EXTRACTOR, PRETRAINED_EXTRACTORS, ENTITY_ATTRIBUTE_START, ENTITY_ATTRIBUTE_END, ENTITY_ATTRIBUTE_VALUE, ENTITY_ATTRIBUTE_TYPE, ENTITY_ATTRIBUTE_ROLE, ENTITY_ATTRIBUTE_GROUP
  from rasa.shared.constants import UTTER_PREFIX
  import rasa.shared.utils.io
  import rasa.shared.data
label_desc: Use image node_id 10 for calling a global function with example usage: build_entity(start, end, value, entity_type, role, group) and returns: entity