human
I wrote the below code

    if (label_smoothing > 0):
        def loss_fn(labels, logits):
            return tf.nn.softmax_cross_entropy_with_logits(logits=logits, labels=labels)
    else:
        def loss_fn(labels, logits):
            return tf.nn.sparse_softmax_cross_entropy_with_logits(logits=logits, labels=labels)
    return loss_fn

What's a good function header?
assistant
#Here's a good function header.

def get_softmax_loss_fn(label_smoothing):