code: def test_example_bot_training_data_raises_only_auto_fill_warning(
      config_file: Text,
      domain_file: Text,
      data_folder: Text,
      raise_slot_warning: bool,
      msg: Optional[Text],
  ):
      importer = TrainingDataImporter.load_from_config(
          config_file, domain_file, [data_folder]
      )
  
      if raise_slot_warning:
          with pytest.warns() as record:
              warnings.simplefilter(
                  action="ignore", category=DeprecationWarning
              )
  
              if msg is not None:
                  warnings.filterwarnings(action="ignore", message=msg)
  
              importer.get_nlu_data()
              importer.get_stories()
  
          assert len(record) == 2
          assert all(
              [
                  "Slot auto-fill has been removed in 3.0 and replaced with "
                  "a new explicit mechanism to set slots."
                  in r.message.args[0]
                  for r in record
              ]
          )
      else:
          with warnings.catch_warnings() as record:
              importer.get_nlu_data()
              importer.get_stories()
  
          assert record is None
  
file_path: rasa/tests/examples/test_example_bots_training_data.py
imports: import warnings
  from pathlib import Path
  from typing import Optional, Text
  import pytest
  from rasa.cli import scaffold
  from rasa.shared.importers.importer import TrainingDataImporter
  from tests.conftest import filter_expected_warnings
label_desc: Use image node_id 1 for calling a global function with example usage: test_example_bot_training_data_raises_only_auto_fill_warning(config_file, domain_file, data_folder, raise_slot_warning, msg) without return types