code: def test_train_validation_fail_on_warnings(
      run_in_simple_project_with_warnings: Callable[..., RunResult],
      request: pytest.FixtureRequest,
  ):
      test_data_dir = Path(
          request.config.rootdir, "data", "test_moodbot", "data"
      )
      test_domain = Path(
          request.config.rootdir, "data", "test_domains", "default.yml"
      )
  
      result = run_in_simple_project_with_warnings(
          "train",
          "--fail-on-validation-warnings",
          "--data",
          str(test_data_dir),
          "--domain",
          str(test_domain),
          "-c",
          "config.yml",
      )
  
      assert "Project validation completed with errors." in str(
          result.outlines
      )
      assert result.ret == 1
  
imports: import os
  import sys
  from pathlib import Path
  from _pytest.capture import CaptureFixture
  import pytest
  from typing import Callable, List
  from _pytest.pytester import RunResult
  from _pytest.tmpdir import TempPathFactory
  import rasa.shared.utils.io
  from rasa.constants import NUMBER_OF_TRAINING_STORIES_FILE
  from rasa.core.policies.policy import Policy
  from rasa.engine.storage.local_model_storage import LocalModelStorage
  from rasa.engine.storage.resource import Resource
  from rasa.shared.core.domain import Domain
  from rasa.model_training import CODE_NEEDS_TO_BE_RETRAINED, CODE_FORCED_TRAINING
  from rasa.shared.constants import LATEST_TRAINING_DATA_FORMAT_VERSION
  from rasa.shared.nlu.training_data.training_data import DEFAULT_TRAINING_DATA_OUTPUT_PATH
  import rasa.utils.io
  from tests.cli.conftest import RASA_EXE
label_desc: Use image node_id 22 for calling a global function with example usage: test_train_validation_fail_on_warnings(run_in_simple_project_with_warnings, request) without return types