code: def _default_predictions_fn(
      logits, mode=tf.estimator.ModeKeys.TRAIN, temperature=1.0
  ):
      """Converts logits to predictions dict. Assumes classification."""
      new_logits = logits
      if mode == tf.estimator.ModeKeys.PREDICT and temperature != 1.0:
          assert temperature > 0
          temp_const = tf.constant(
              1 / temperature, name="softmax_temperature_const"
          )
          logging.info("Applying temperature to logits")
          new_logits = tf.multiply(
              logits, temp_const, name="softmax_temperature_mul"
          )
  
      predictions = tf.math.argmax(input=new_logits, axis=-1)
      probabilities = tf.nn.softmax(new_logits)
      log_probabilities = tf.nn.log_softmax(new_logits)
  
      predictions_dict = {
          "predictions": predictions,
          "probabilities": probabilities,
          "log_probabilities": log_probabilities,
          "logits": logits,
      }
      return predictions_dict
  
imports: import functools
  import inspect
  from absl import logging
  import keras_tuner
  from model_search import controller
  from model_search import hparam
  from model_search import loss_fns
  from model_search import metric_fns
  from model_search import task_manager
  from model_search.architecture import architecture_utils
  from model_search.generators import base_tower_generator
  from model_search.generators import trial_utils
  from model_search.meta import transfer_learning
  from model_search.metadata import ml_metadata_db
  from model_search.proto import phoenix_spec_pb2
  from model_search.proto import transfer_learning_spec_pb2
  import numpy
  import tensorflow.compat.v2
label_desc: Use image node_id 3 for calling a global function with example usage: _default_predictions_fn(logits, mode, temperature) and returns: predictions_dict