code: def test_import_nlu_training_data_from_e2e_stories(
      default_importer: TrainingDataImporter,
  ):
      # The `E2EImporter` correctly wraps the underlying `CombinedDataImporter`
      assert isinstance(default_importer, E2EImporter)
      importer_without_e2e = default_importer.importer
  
      stories = StoryGraph(
          [
              StoryStep(
                  "name",
                  events=[
                      SlotSet("some slot", "doesn't matter"),
                      UserUttered(
                          intent={"name": "greet_from_stories"}
                      ),
                      ActionExecuted("utter_greet_from_stories"),
                  ],
              ),
              StoryStep(
                  "name",
                  events=[
                      UserUttered("how are you doing?"),
                      ActionExecuted(action_text="Hi Joey."),
                  ],
              ),
          ]
      )
  
      def mocked_stories(*_: Any, **__: Any) -> StoryGraph:
          return stories
  
      # Patch to return our test stories
      importer_without_e2e.get_stories = mocked_stories
  
      # The wrapping `E2EImporter` simply forwards these method calls
      assert (importer_without_e2e.get_stories()).fingerprint() == (
          default_importer.get_stories()
      ).fingerprint()
      assert (importer_without_e2e.get_config()) == (
          default_importer.get_config()
      )
  
      # Check additional NLU training data from stories was added
      nlu_data = default_importer.get_nlu_data()
  
      # The `E2EImporter` adds NLU training data based on our training stories
      assert len(nlu_data.training_examples) > len(
          importer_without_e2e.get_nlu_data().training_examples
      )
  
      # Check if the NLU training data was added correctly from the story training data
      expected_additional_messages = [
          Message(data={INTENT: "greet_from_stories"}),
          Message(data={ACTION_NAME: "utter_greet_from_stories"}),
          Message(data={TEXT: "how are you doing?"}),
          Message(data={ACTION_TEXT: "Hi Joey."}),
      ]
  
      assert all(
          m in nlu_data.training_examples
          for m in expected_additional_messages
      )
  
imports: import os
  from pathlib import Path
  from typing import Text, Dict, Type, List, Any
  import pytest
  from rasa.shared.constants import DEFAULT_CONFIG_PATH, DEFAULT_DOMAIN_PATH, DEFAULT_DATA_PATH, DEFAULT_CONVERSATION_TEST_PATH
  import rasa.shared.utils.io
  import rasa.shared.core.constants
  from rasa.shared.core.events import SlotSet, UserUttered, ActionExecuted
  from rasa.shared.core.training_data.structures import StoryStep, StoryGraph
  from rasa.shared.importers.importer import TrainingDataImporter, NluDataImporter, E2EImporter, ResponsesSyncImporter
  from rasa.shared.importers.multi_project import MultiProjectImporter
  from rasa.shared.importers.rasa import RasaFileImporter
  from rasa.shared.nlu.constants import ACTION_TEXT, ACTION_NAME, INTENT, TEXT
  from rasa.shared.nlu.training_data.message import Message
label_desc: Use image node_id 5 for calling a global function with example usage: test_import_nlu_training_data_from_e2e_stories(default_importer) and returns: stories