docstr: Apply BART noise to src side tokens.
docstr_tok: ["Apply","BART","noise","to","src","side","tokens","."]
code: def apply(self, example, is_train=False, stats=None, **kwargs):
      """Apply BART noise to src side tokens."""
      if is_train:
          src = self.bart_noise.apply(example["src"])
          example["src"] = src
      return example
  
imports: import math
  import numpy
  import torch
  from typing import Sequence, Callable
  from onmt.constants import DefaultTokens, SubwordMarker
  from onmt.transforms import register_transform
  from .transform import Transform
label_desc: Use image node_id 6 for calling the BARTNoiseTransform obj's underlying member method code with example usage: obj.apply(example, is_train, stats) and returns: example