code: def test_train_model_training_data_persisted(
      tmp_path: Path,
      nlu_as_json_path: Text,
      tmp_path_factory: TempPathFactory,
  ):
      config_file = tmp_path / "config.yml"
      rasa.shared.utils.io.dump_obj_as_json_to_file(
          config_file,
          {
              "pipeline": [{"name": "KeywordIntentClassifier"}],
              "language": "en",
              "assistant_id": "placeholder_default",
          },
      )
  
      persisted_path = rasa.model_training.train_nlu(
          str(config_file),
          nlu_as_json_path,
          output=str(tmp_path),
          persist_nlu_training_data=True,
      )
  
      assert Path(persisted_path).is_file()
  
      model_dir = tmp_path_factory.mktemp("loaded")
      storage, _ = LocalModelStorage.from_model_archive(
          model_dir, Path(persisted_path)
      )
  
      nlu_data_dir = model_dir / "nlu_training_data_provider"
  
      assert nlu_data_dir.is_dir()
  
      assert (
          not RasaYAMLReader()
          .read(nlu_data_dir / "training_data.yml")
          .is_empty()
      )
  
imports: from pathlib import Path
  import pytest
  from _pytest.tmpdir import TempPathFactory
  from rasa.core.agent import Agent
  from rasa.core.policies.policy import Policy
  from rasa.engine.storage.local_model_storage import LocalModelStorage
  from rasa.shared.nlu.training_data.formats import RasaYAMLReader
  from rasa.utils.tensorflow.constants import EPOCHS, RUN_EAGERLY
  from typing import Any, Dict, List, Tuple, Text, Union, Optional
  import rasa.model_training
  import rasa.shared.utils.io
  import rasa.engine.recipes.default_components
label_desc: Use image node_id 9 for calling a global function with example usage: test_train_model_training_data_persisted(tmp_path, nlu_as_json_path, tmp_path_factory) without return types