code: def _check_similarity_loss_setting(
      component_config: Dict[Text, Any]
  ) -> None:
      if (
          component_config[SIMILARITY_TYPE] == COSINE
          and component_config[LOSS_TYPE] == CROSS_ENTROPY
          or component_config[SIMILARITY_TYPE] == INNER
          and component_config[LOSS_TYPE] == MARGIN
      ):
          rasa.shared.utils.io.raise_warning(
              f"`{SIMILARITY_TYPE}={component_config[SIMILARITY_TYPE]}`"
              f" and `{LOSS_TYPE}={component_config[LOSS_TYPE]}` "
              f"is not a recommended setting as it may not lead to best results."
              f"Ideally use `{SIMILARITY_TYPE}={INNER}`"
              f" and `{LOSS_TYPE}={CROSS_ENTROPY}` or"
              f"`{SIMILARITY_TYPE}={COSINE}` and `{LOSS_TYPE}={MARGIN}`.",
              category=UserWarning,
          )
  
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 18 for calling a global function with example usage: _check_similarity_loss_setting(component_config) without return types