code: def test_confidence_renormalization_settings(
      component_config: Dict[Text, Any], raises_exception: bool
  ):
      component_config[LOSS_TYPE] = CROSS_ENTROPY
      if raises_exception:
          with pytest.raises(InvalidConfigException):
              train_utils._check_confidence_setting(component_config)
      else:
          train_utils._check_confidence_setting(component_config)
  
imports: from typing import Any, Dict, List
  import numpy
  import pytest
  from typing import Text
  import rasa.utils.train_utils
  from rasa.nlu.constants import NUMBER_OF_SUB_TOKENS
  from rasa.nlu.tokenizers.tokenizer import Token
  from rasa.shared.nlu.constants import SPLIT_ENTITIES_BY_COMMA_DEFAULT_VALUE, SPLIT_ENTITIES_BY_COMMA
  from rasa.utils.tensorflow.constants import MODEL_CONFIDENCE, RANKING_LENGTH, RENORMALIZE_CONFIDENCES, SIMILARITY_TYPE, LOSS_TYPE, COSINE, SOFTMAX, INNER, CROSS_ENTROPY, MARGIN, AUTO, TOLERANCE, CHECKPOINT_MODEL, EVAL_NUM_EPOCHS, EVAL_NUM_EXAMPLES, EPOCHS
  from rasa.shared.exceptions import InvalidConfigException
label_desc: Use image node_id 6 for calling a global function with example usage: test_confidence_renormalization_settings(component_config, raises_exception) without return types