code: def test_token_insert(self):
      bart_noise = BARTNoising(
          vocab=[self.FAKE_VOCAB],
          mask_tok=self.MASK_TOK,
          insert_ratio=0.5,
          random_ratio=0.3,
          replace_length=0,  # not raise Error
          # Defalt: full_stop_token=[".", "?", "!"]
      )
      tokens = ["This", "looks", "really", "good", "!"]
      inserted = bart_noise.apply(tokens)
      n_insert = math.ceil(len(tokens) * bart_noise.insert_ratio)
      inserted_len = n_insert + len(tokens)
      self.assertEqual(len(inserted), inserted_len)
      # random_ratio of inserted tokens are chosen in vocab
      n_random = math.ceil(n_insert * bart_noise.random_ratio)
      self.assertEqual(
          sum(1 if tok == self.FAKE_VOCAB else 0 for tok in inserted),
          n_random,
      )
      # others are MASK_TOK
      self.assertEqual(
          sum(1 if tok == self.MASK_TOK else 0 for tok in inserted),
          n_insert - n_random,
      )
  
imports: import unittest
  import copy
  import yaml
  import math
  from argparse import Namespace
  from onmt.transforms import get_transforms_cls, get_specials, make_transforms, TransformPipe
  from onmt.transforms.bart import BARTNoising
label_desc: Use image node_id 4 for calling the TestBARTNoising obj's underlying member method code with example usage: obj.test_token_insert() without return types