class_docstr: Extension of fairseq.data.BacktranslationDataset where each example
  has a weight in [0.0, 1.0], which will be used to weigh the loss.
  
  Args:
      weights (list): list of per example weight values; each example
      has a weight in [0.0, 1.0]. Alternatively, when weights consists of a
      single value, that value is broadcast as weight to all examples. [0.0]
      gives 0 weight to all examples.
code: def __init__(self, dataset, weights=None, **kwargs):
      self.weights = weights
      self.dataset = dataset
  
imports: import torch
  from fairseq import data
label_desc: Use image node_id 1 to create a new WeightedBacktranslationDataset object from inherited base classes: data.backtranslation_dataset with example: obj = WeightedBacktranslationDataset(dataset, weights)