code: def _replace_deprecated_option(
      old_option: Text,
      new_option: Union[Text, List[Text]],
      config: Dict[Text, Any],
      warn_until_version: Text = NEXT_MAJOR_VERSION_FOR_DEPRECATIONS,
  ) -> Dict[Text, Any]:
      if old_option not in config:
          return {}
  
      if isinstance(new_option, str):
          rasa.shared.utils.io.raise_deprecation_warning(
              f"Option '{old_option}' got renamed to '{new_option}'. "
              f"Please update your configuration file.",
              warn_until_version=warn_until_version,
          )
          return {new_option: config[old_option]}
  
      rasa.shared.utils.io.raise_deprecation_warning(
          f"Option '{old_option}' got renamed to "
          f"a dictionary '{new_option[0]}' with a key '{new_option[1]}'. "
          f"Please update your configuration file.",
          warn_until_version=warn_until_version,
      )
      return {new_option[0]: {new_option[1]: config[old_option]}}
  
imports: from pathlib import Path
  import numpy
  from typing import Optional, Text, Dict, Any, Union, List, Tuple, TYPE_CHECKING
  import rasa.shared.utils.common
  import rasa.shared.utils.io
  import rasa.nlu.utils.bilou_utils
  from rasa.shared.constants import NEXT_MAJOR_VERSION_FOR_DEPRECATIONS
  from rasa.nlu.constants import NUMBER_OF_SUB_TOKENS
  import rasa.utils.io
  from rasa.utils.tensorflow.constants import LOSS_TYPE, RANKING_LENGTH, RENORMALIZE_CONFIDENCES, SIMILARITY_TYPE, EVAL_NUM_EXAMPLES, EVAL_NUM_EPOCHS, EPOCHS, SOFTMAX, MARGIN, AUTO, INNER, COSINE, SEQUENCE, CROSS_ENTROPY, CONSTRAIN_SIMILARITIES, MODEL_CONFIDENCE, TOLERANCE, CHECKPOINT_MODEL
  from rasa.utils.tensorflow.callback import RasaTrainingLogger, RasaModelCheckpoint
  from rasa.utils.tensorflow.data_generator import RasaBatchDataGenerator
  from rasa.utils.tensorflow.model_data import RasaModelData
  from rasa.shared.nlu.constants import SPLIT_ENTITIES_BY_COMMA
  from rasa.shared.exceptions import InvalidConfigException
label_desc: Use image node_id 6 for calling a global function with example usage: _replace_deprecated_option(old_option, new_option, config, warn_until_version) and returns: dict, dict, dict