code: def compute_smoothed_label(self, net):
      assert self.label_smoothing_matrix is not None
      label = self.input_record.label()
      original_label_type = self.input_record.label.field_type()
      if original_label_type.base != np.int64:
          int64_label = net.NextScopedBlob("int64_label")
          net.Cast([label], [int64_label], to=core.DataType.INT64)
      else:
          int64_label = label
      one_hot_label = net.NextScopedBlob("one_hot_label")
      smoothed_label = net.NextScopedBlob("smoothed_label")
      net.OneHot([int64_label, self.label_dim], [one_hot_label])
      net.MatMul(
          [one_hot_label, self.label_smoothing_matrix], smoothed_label
      )
      return smoothed_label
  
file_path: pytorch/caffe2/python/layers/batch_softmax_loss.py
imports: from caffe2.python import core, schema
  from caffe2.python.layers.layers import ModelLayer
  import numpy
label_desc: Use image node_id 3 for calling the BatchSoftmaxLoss obj's underlying member method code with example usage: obj.compute_smoothed_label(net) and returns: smoothed_label