code: def softmax_cross_entropy_one_hot(logits, labels, weights_fn=None):
      """Calculate softmax cross entropy given one-hot labels and logits.
  
      Args:
        logits: Tensor of size [batch-size, o=1, p=1, num-classes]
        labels: Tensor of size [batch-size, o=1, p=1, num-classes]
        weights_fn: Function that takes in labels and weighs examples (unused)
      Returns:
        cross-entropy (scalar), weights
      """
      with tf.variable_scope(
          "softmax_cross_entropy_one_hot", values=[logits, labels]
      ):
          del weights_fn
          cross_entropy = tf.losses.softmax_cross_entropy(
              onehot_labels=labels, logits=logits
          )
          return cross_entropy, tf.constant(1.0)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import numpy
  import six
  from tensor2tensor.layers import common_layers
  from tensor2tensor.layers import modalities
  from tensor2tensor.utils import bleu_hook
  from tensor2tensor.utils import contrib
  from tensor2tensor.utils import rouge
  from tensor2tensor.utils import sari_hook
  import tensorflow.compat.v1
  from tensorflow.python.util import tf_inspect
label_desc: Use image node_id 25 for calling a global function with example usage: softmax_cross_entropy_one_hot(logits, labels, weights_fn) and returns: cross_entropy,  tf