code: def loss_fn(labels, logits):
      """
      Added softmax cross entropy loss for MIM as in the original MI-FGSM paper.
      """
  
      return tf.nn.sparse_softmax_cross_entropy_with_logits(
          labels, logits, name=None
      )
  
imports: import numpy
  import tensorflow
  from cleverhans.tf2.utils import optimize_linear, compute_gradient
  from cleverhans.tf2.utils import clip_eta
label_desc: Use image node_id 2 for calling a global function with example usage: loss_fn(labels, logits) and returns: tf