code: def test_generate_message_raises_on_overlapping_but_not_identical_spans(
      message_text: Text,
      entities: List[Dict[Text, Any]],
  ):
      message = Message.build(
          message_text, "dummy_intent", entities=entities
      )
      with pytest.raises(ValueError):
          TrainingDataWriter.generate_message(message)
  
imports: import pytest
  from rasa.shared.nlu.training_data.formats.readerwriter import TrainingDataWriter
  from rasa.shared.nlu.training_data.message import Message
  from rasa.shared.constants import INTENT_MESSAGE_PREFIX
  from typing import Text, List, Dict, Any
label_desc: Use image node_id 2 for calling a global function with example usage: test_generate_message_raises_on_overlapping_but_not_identical_spans(message_text, entities) without return types