code: def tempered_softmax(activations, t, num_iters=5):
      """Tempered softmax function.
      Args:
        activations: A multi-dimensional tensor with last dimension `num_classes`.
        t: Temperature > 1.0.
        num_iters: Number of iterations to run the method.
      Returns:
        A probabilities tensor.
      """
      if t == 1.0:
          return activations.softmax(dim=-1)
  
      normalization_constants = compute_normalization(
          activations, t, num_iters
      )
      return exp_t(activations - normalization_constants, t)
  
imports: from typing import Optional
  import torch
  from torch import nn, Tensor
label_desc: Use image node_id 6 for calling a global function with example usage: tempered_softmax(activations, t, num_iters) and returns: exp_t, activations