code: def interactive(args: argparse.Namespace) -> None:
      _set_not_required_args(args)
      file_importer = TrainingDataImporter.load_from_config(
          args.config,
          args.domain,
          args.data if not args.core_only else [args.stories],
      )
  
      if args.model is None:
          story_graph = file_importer.get_stories()
          if not story_graph or story_graph.is_empty():
              rasa.shared.utils.cli.print_error_and_exit(
                  "Could not run interactive learning without either core "
                  "data or a model containing core data."
              )
  
          zipped_model: Optional[Union[Text, Path]] = (
              train.run_core_training(args)
              if args.core_only
              else train.run_training(args)
          )
          if not zipped_model:
              rasa.shared.utils.cli.print_error_and_exit(
                  "Could not train an initial model. Either pass paths "
                  "to the relevant training files (`--data`, `--config`, `--domain`), "
                  "or use 'rasa train' to train a model."
              )
      else:
          validate_assistant_id_key_in_config(file_importer)
  
          zipped_model = get_provided_model(args.model)
          if not (zipped_model and os.path.exists(zipped_model)):
              rasa.shared.utils.cli.print_error_and_exit(
                  f"Interactive learning process cannot be started as no "
                  f"initial model was found at path '{args.model}'.  "
                  f"Use 'rasa train' to train a model."
              )
          if not args.skip_visualization:
              logger.info(
                  f"Loading visualization data from {args.data}."
              )
  
      perform_interactive_learning(args, zipped_model, file_importer)
  
imports: import argparse
  import logging
  import os
  from pathlib import Path
  from typing import List, Optional, Text, Union
  from rasa import model
  from rasa.cli import SubParsersAction
  from rasa.cli.arguments import interactive
  import rasa.cli.train
  import rasa.cli.utils
  from rasa.engine.storage.local_model_storage import LocalModelStorage
  from rasa.shared.constants import ASSISTANT_ID_DEFAULT_VALUE, ASSISTANT_ID_KEY, DEFAULT_ENDPOINTS_PATH, DEFAULT_MODELS_PATH
  from rasa.shared.data import TrainingType
  from rasa.shared.importers.importer import TrainingDataImporter
  import rasa.shared.utils.cli
  import rasa.utils.common
label_desc: Use image node_id 2 for calling a global function with example usage: interactive(args) without return types