code: def test_reduction(self):
      self.args.label_smoothing = 0.1
      crit = LabelSmoothedCrossEntropyCriterion.build_criterion(
          self.args, self.task
      )
      loss, _, logging_output = crit(
          self.model, self.sample, reduce=True
      )
      unreduced_loss, _, _ = crit(self.model, self.sample, reduce=False)
      self.assertAlmostEqual(loss, unreduced_loss.sum())
  
file_path: fairseq/tests/test_label_smoothing.py
imports: import argparse
  import copy
  import unittest
  import tests.utils
  import torch
  from fairseq.criterions.cross_entropy import CrossEntropyCriterion
  from fairseq.criterions.label_smoothed_cross_entropy import LabelSmoothedCrossEntropyCriterion
label_desc: Use image node_id 4 for calling the TestLabelSmoothing obj's underlying member method code with example usage: obj.test_reduction() without return types