class_docstr: Recipe which converts the normal model config to train and predict graph.
class_docstr_tok: ["Recipe","which","converts","the","normal","model","config","to","train","and","predict","graph","."]
docstr: Dump the automatically configured keys into the config file.
  
  The configuration provided in the file is kept as it is (preserving the order of
  keys and comments).
  For keys that were automatically configured, an explanatory
  comment is added and the automatically chosen configuration is
  added commented-out.
  If there are already blocks with comments from a previous auto
  configuration run, they are replaced with the new auto
  configuration.
  
  Args:
      config: The configuration including the automatically configured keys.
      config_file_path: The file into which the configuration should be dumped.
      missing_keys: Keys that need to be added to the config file.
      auto_configured_keys: Keys for which a commented out auto
      configuration section needs to be added to the config file.
      training_type: NLU, CORE or BOTH depending on which is trained.
code: def _dump_config(
      config: Dict[Text, Any],
      config_file_path: Text,
      missing_keys: Set[Text],
      auto_configured_keys: Set[Text],
      training_type: Optional[TrainingType] = TrainingType.BOTH,
  ) -> None:
      """Dump the automatically configured keys into the config file.
  
      The configuration provided in the file is kept as it is (preserving the order of
      keys and comments).
      For keys that were automatically configured, an explanatory
      comment is added and the automatically chosen configuration is
      added commented-out.
      If there are already blocks with comments from a previous auto
      configuration run, they are replaced with the new auto
      configuration.
  
      Args:
          config: The configuration including the automatically configured keys.
          config_file_path: The file into which the configuration should be dumped.
          missing_keys: Keys that need to be added to the config file.
          auto_configured_keys: Keys for which a commented out auto
          configuration section needs to be added to the config file.
          training_type: NLU, CORE or BOTH depending on which is trained.
      """
      config_as_expected = DefaultV1Recipe._is_config_file_as_expected(
          config_file_path,
          missing_keys,
          auto_configured_keys,
          training_type,
      )
      if not config_as_expected:
          rasa.shared.utils.cli.print_error(
              f"The configuration file at '{config_file_path}' has been removed or "
              f"modified while the automatic configuration was running. The current "
              f"configuration will therefore not be dumped to the file. If you want "
              f"your model to use the configuration provided in "
              f"'{config_file_path}' you need to re-run training."
          )
          return
  
      DefaultV1Recipe._add_missing_config_keys_to_file(
          config_file_path, missing_keys
      )
  
      autoconfig_lines = (
          DefaultV1Recipe._get_commented_out_autoconfig_lines(
              config, auto_configured_keys
          )
      )
  
      current_config_content = rasa.shared.utils.io.read_file(
          config_file_path
      )
      current_config_lines = current_config_content.splitlines(
          keepends=True
      )
  
      updated_lines = DefaultV1Recipe._get_lines_including_autoconfig(
          current_config_lines, autoconfig_lines
      )
  
      rasa.shared.utils.io.write_text_file(
          "".join(updated_lines), config_file_path
      )
  
      auto_configured_keys_text = transform_collection_to_sentence(
          auto_configured_keys
      )
      rasa.shared.utils.cli.print_info(
          f"The configuration for {auto_configured_keys_text} "
          f"was chosen automatically. "
          f"It was written into the config file at '{config_file_path}'."
      )
  
imports: from __future__ import annotations
  import copy
  import enum
  import logging
  import math
  from enum import Enum
  from typing import Dict, Text, Any, Tuple, Type, Optional, List, Callable, Set, Union
  import dataclasses
  from rasa.core.featurizers.precomputation import CoreFeaturizationInputConverter, CoreFeaturizationCollector
  from rasa.plugin import plugin_manager
  from rasa.shared.exceptions import FileNotFoundException
  from rasa.core.policies.ensemble import DefaultPolicyPredictionEnsemble
  from rasa.engine.graph import GraphSchema, GraphComponent, SchemaNode, GraphModelConfiguration
  from rasa.engine.constants import PLACEHOLDER_IMPORTER, PLACEHOLDER_MESSAGE, PLACEHOLDER_TRACKER
  from rasa.engine.recipes.recipe import Recipe
  from rasa.engine.storage.resource import Resource
  from rasa.graph_components.converters.nlu_message_converter import NLUMessageConverter
  from rasa.graph_components.providers.domain_provider import DomainProvider
  from rasa.graph_components.providers.forms_provider import FormsProvider
  from rasa.graph_components.providers.responses_provider import ResponsesProvider
  from rasa.graph_components.providers.domain_for_core_training_provider import DomainForCoreTrainingProvider
  from rasa.graph_components.providers.nlu_training_data_provider import NLUTrainingDataProvider
  from rasa.graph_components.providers.rule_only_provider import RuleOnlyDataProvider
  from rasa.graph_components.providers.story_graph_provider import StoryGraphProvider
  from rasa.graph_components.providers.training_tracker_provider import TrainingTrackerProvider
  import rasa.shared.constants
  from rasa.shared.exceptions import RasaException, InvalidConfigException
  from rasa.shared.constants import ASSISTANT_ID_KEY
  from rasa.shared.data import TrainingType
  from rasa.utils.tensorflow.constants import EPOCHS
  from rasa.shared.utils.common import class_from_module_path, transform_collection_to_sentence
label_desc: Use image node_id 24 for calling the DefaultV1Recipe obj's underlying member method code with example usage: obj._dump_config(config, config_file_path, missing_keys, auto_configured_keys, training_type) without return types