code: def update_evaluation_parameters(
      config: Dict[Text, Any]
  ) -> Dict[Text, Any]:
      """If EVAL_NUM_EPOCHS is set to -1, evaluate at the end of the training.
  
      Args:
          config: model configuration
  
      Returns: updated model configuration
      """
      if config[EVAL_NUM_EPOCHS] == -1:
          config[EVAL_NUM_EPOCHS] = config[EPOCHS]
      elif config[EVAL_NUM_EPOCHS] < 1:
          raise InvalidConfigException(
              f"'{EVAL_NUM_EPOCHS}' is set to "
              f"'{config[EVAL_NUM_EPOCHS]}'. "
              "Only values either equal to -1 or greater than 0 are allowed for this "
              "parameter."
          )
      if config[CHECKPOINT_MODEL] and config[EVAL_NUM_EXAMPLES] == 0:
          config[CHECKPOINT_MODEL] = False
      return config
  
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 4 for calling a global function with example usage: update_evaluation_parameters(config) and returns: config