class_docstr: Label smoothing loss with sample-wise logging.
code: def __init__(self, config, ignore_index=-1):
      super().__init__(config, ignore_index)
  
      # Sample-wise tracking variables.
      self.samplewise_label_loss = 0
      self.samplewise_smoothing_loss = 0
  
imports: from typing import Union
  import torch
  from pytext.config import ConfigBase
  from pytext.config.component import create_loss
  from .loss import HingeLoss, Loss, maybe_log_normalize, NLLLoss, SourceType
  from .regularizer import AdaptiveRegularizer, EntropyRegularizer, UniformRegularizer
  from .structured_loss import StructuredLoss, StructuredMarginLoss
label_desc: Use image node_id 1 to create a new SamplewiseLabelSmoothingLoss object from inherited base classes: LabelSmoothingLoss with example: obj = SamplewiseLabelSmoothingLoss(config, ignore_index)