class_docstr: Noise from BART.
class_docstr_tok: ["Noise","from","BART","."]
code: def rolling_noise(self, tokens, p=1.0):
      if np.random.random() >= p:
          return tokens
      offset = np.random.randint(0, max(1, len(tokens) - 1) + 1)
      return tokens[offset:] + tokens[0:offset]
  
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 8 for calling the BARTNoising obj's underlying member method code with example usage: obj.rolling_noise(tokens, p) and returns: unknown, tokens