code: def _raise_on_same_start_and_different_end_positions(
      aggregated_entities: Dict[int, List[Dict[Text, Any]]],
  ) -> None:
      """Raises a ValueError iff two entities have overlapping but not identical spans.
  
      Args:
          aggregated_entities: Entities for each start position
      """
      for entity_list in aggregated_entities.values():
          end = entity_list[0]["end"]
          for entity in entity_list[1:]:
              # By construction, start positions of all entities in `entity_list` are
              # identical
              if entity["end"] != end:
                  raise ValueError(
                      f"Entities '{entity}' and "
                      f"'{entity_list[0]}' have identical "
                      f"start but different end positions"
                  )
  
imports: import abc
  import json
  from collections import OrderedDict
  from pathlib import Path
  import rasa.shared.nlu.training_data.util
  from rasa.shared.constants import INTENT_MESSAGE_PREFIX
  from rasa.shared.nlu.constants import INTENT, ENTITY_ATTRIBUTE_VALUE, ENTITY_ATTRIBUTE_START, ENTITY_ATTRIBUTE_END, ENTITY_ATTRIBUTE_TYPE, ENTITY_ATTRIBUTE_GROUP, ENTITY_ATTRIBUTE_ROLE
  import rasa.shared.utils.io
  import typing
  from typing import Text, Dict, Any, Union, List
  from collections import defaultdict
label_desc: Use image node_id 1 for calling a global function with example usage: _raise_on_same_start_and_different_end_positions(aggregated_entities) without return types