class_docstr: Noise from BART.
class_docstr_tok: ["Noise","from","BART","."]
code: def apply(self, tokens):
      if self.permute_sent_ratio > 0.0:
          tokens = self.permute_sentences(
              tokens, self.permute_sent_ratio
          )
  
      if self.mask_ratio > 0.0:
          tokens = self.whole_word_mask(tokens, self.mask_ratio)
  
      if self.insert_ratio > 0.0:
          tokens = self.insertion_noise(tokens, self.insert_ratio)
  
      if self.rotate_ratio > 0.0:
          tokens = self.rolling_noise(tokens, self.rotate_ratio)
      return tokens
  
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 9 for calling the BARTNoising obj's underlying member method code with example usage: obj.apply(tokens) and returns: tokens