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:
          temp_const = tf.constant(
              1 / temperature, name="softmax_temperature_const"
          )
          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,
      }
      return predictions_dict
  
imports: import collections
  from absl.testing import parameterized
  from model_search import hparam
  from model_search import loss_fns
  from model_search import task_manager
  from model_search.architecture import architecture_utils
  from model_search.generators import trial_utils
  from model_search.proto import phoenix_spec_pb2
  import numpy
  import tensorflow.compat.v2
  from google.protobuf import text_format
label_desc: Use image node_id 2 for calling a global function with example usage: _default_predictions_fn(logits, mode, temperature) and returns: predictions_dict