code: def test_train_core_help(run: Callable[..., RunResult]):
      output = run("train", "core", "--help")
  
      if sys.version_info.minor >= 9:
          # This is required because `argparse` behaves differently on
          # Python 3.9 and above. The difference is the changed formatting of help
          # output for CLI arguments with `nargs="*"
          help_text = f"""usage: {RASA_EXE} train core [-h] [-v] [-vv] [--quiet]
                         [--logging-config-file LOGGING_CONFIG_FILE]
                         [-s STORIES] [-d DOMAIN] [-c CONFIG [CONFIG ...]]
                         [--out OUT] [--augmentation AUGMENTATION]
                         [--debug-plots] [--force]
                         [--fixed-model-name FIXED_MODEL_NAME]
                         [--percentages [PERCENTAGES ...]] [--runs RUNS]
                         [--finetune [FINETUNE]]
                         [--epoch-fraction EPOCH_FRACTION]"""
      else:
          help_text = f"""usage: {RASA_EXE} train core [-h] [-v] [-vv] [--quiet]
                         [--logging-config-file LOGGING_CONFIG_FILE]
                         [-s STORIES] [-d DOMAIN] [-c CONFIG [CONFIG ...]]
                         [--out OUT] [--augmentation AUGMENTATION]
                         [--debug-plots] [--force]
                         [--fixed-model-name FIXED_MODEL_NAME]
                         [--percentages [PERCENTAGES [PERCENTAGES ...]]]
                         [--runs RUNS] [--finetune [FINETUNE]]
                         [--epoch-fraction EPOCH_FRACTION]"""
  
      lines = help_text.split("\n")
      # expected help text lines should appear somewhere in the output
      printed_help = {line.strip() for line in output.outlines}
      for line in lines:
          assert line.strip() in printed_help
  
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 19 for calling a global function with example usage: test_train_core_help(run) without return types