code: def test_sentence_permute(self):
      sent1 = ["Hello", "world", "."]
      sent2 = ["Sentence", "1", "!"]
      sent3 = ["Sentence", "2", "!"]
      sent4 = ["Sentence", "3", "!"]
  
      bart_noise = BARTNoising(
          vocab=[self.FAKE_VOCAB],
          permute_sent_ratio=0.5,
          replace_length=0,  # not raise Error
          # Defalt: full_stop_token=[".", "?", "!"]
      )
      tokens = sent1 + sent2 + sent3 + sent4
      ends = bart_noise._get_sentence_borders(tokens).tolist()
      self.assertEqual(ends, [3, 6, 9, 12])
      tokens_perm = bart_noise.apply(tokens)
      expected_tokens = sent2 + sent1 + sent3 + sent4
      self.assertEqual(expected_tokens, tokens_perm)
  
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 2 for calling the TestBARTNoising obj's underlying member method code with example usage: obj.test_sentence_permute() without return types