code: def test_encode_decode_round_trip(self):
      tokenizer = RemBertTokenizer(SAMPLE_VOCAB, keep_accents=True)
  
      text = "清水寺は京都にある。"
      tokens = tokenizer.tokenize(text)
      self.assertListEqual(tokens, ["▁", "清水寺は京都にある。"])
      encoded_string = tokenizer.encode(text)
      self.assertListEqual(encoded_string, [1000, 7, 0, 1001])
      decode_text = tokenizer.convert_tokens_to_string(tokens)
      self.assertEquals(decode_text, text)
  
      text = "That's awesome! 🤩 #HuggingFace,  🌟 Have a great day! 🌈"
      tokens = tokenizer.tokenize(text)
      self.assertListEqual( tokens, ['▁That', "'", 's', '▁a', 'w', 'es', 'ome', '!', '▁', '🤩', '▁', '#', 'H', 'u', 'g', 'g', 'ing', 'F', 'a', 'ce', ',', '▁', '🌟', '▁H', 'a', 've', '▁a', '▁great', '▁day', '!', '▁', '🌈'])  # fmt: skip
      decode_text = tokenizer.convert_tokens_to_string(tokens)
      self.assertEquals(
          decode_text,
          "That's awesome! 🤩 #HuggingFace, 🌟 Have a great day! 🌈",
      )
  
      text = "In the sky up above"
      tokens = tokenizer._tokenize(text)
      self.assertListEqual(tokens, ["▁In", "▁the", "▁s", "k", "y", "▁up", "▁a", "b", "o", "ve"])  # fmt: skip
      encoded_string = tokenizer.encode(text)
      self.assertListEqual(
          encoded_string,
          [1000, 388, 5, 47, 45, 30, 118, 10, 65, 20, 123, 1001],
      )
      decode_text = tokenizer.convert_tokens_to_string(tokens)
      self.assertEqual(text, decode_text)
  
      text = "The cat. . Sat <s>.In a room"
      tokens = tokenizer.tokenize(text)
      self.assertListEqual(
          tokens,
          [
              "▁The",
              "▁c",
              "at",
              ".",
              "▁",
              ".",
              "▁S",
              "at",
              "▁",
              "<",
              "s",
              ">",
              ".",
              "I",
              "n",
              "▁a",
              "▁room",
          ],
      )
      encoded_string = tokenizer.encode(text)
      self.assertListEqual(
          encoded_string,
          [
              1000,
              68,
              69,
              76,
              4,
              7,
              4,
              166,
              76,
              7,
              0,
              6,
              0,
              4,
              100,
              24,
              10,
              136,
              1001,
          ],
      )
      decode_text = tokenizer.convert_tokens_to_string(tokens)
      self.assertEqual(text, decode_text)
  
      text = "Invoice #12345, dated 2023-12-01, is due on 2024-01-15."
      tokens = tokenizer.tokenize(text)
      self.assertListEqual(tokens, ['▁In', 'v', 'o', 'ic', 'e', '▁', '#', '1', '2', '34', '5', ',', '▁da', 'ted', '▁', '2', '0', '2', '3', '-', '1', '2', '-', '0', '1', ',', '▁is', '▁d', 'u', 'e', '▁on', '▁', '2', '0', '2', '4', '-', '0', '1', '-', '1', '5', '.'])  # fmt: skip
      encoded_string = tokenizer.encode(text)
      self.assertListEqual(encoded_string, [1000, 388, 83, 20, 113, 15, 7, 0, 356, 602, 0, 555, 3, 417, 273, 7, 602, 347, 602, 0, 33, 356, 602, 33, 347, 356, 3, 46, 229, 51, 15, 59, 7, 602, 347, 602, 0, 33, 347, 356, 33, 356, 555, 4, 1001])  # fmt: skip
      decode_text = tokenizer.convert_tokens_to_string(tokens)
      self.assertEqual(text, decode_text)
  
      text = (
          "Lorem ipsum dolor sit amet, consectetur adipiscing elit..."
      )
      tokens = tokenizer.tokenize(text)
      self.assertListEqual(tokens,  ['▁', 'L', 'or', 'em', '▁', 'i', 'p', 's', 'um', '▁do', 'l', 'or', '▁sit', '▁am', 'e', 't', ',', '▁con', 'se', 'c', 'te', 't', 'ur', '▁a', 'd', 'i', 'p', 'is', 'c', 'ing', '▁', 'el', 'it', '.', '.', '.'])  # fmt: skip
      encoded_string = tokenizer.encode(text)
      self.assertListEqual( encoded_string,  [1000, 7, 279, 55, 300, 7, 23, 29, 6, 155, 92, 27, 55, 615, 219, 15, 14, 3, 247, 114, 28, 181, 14, 108, 10, 16, 23, 29, 125, 28, 17, 7, 168, 137, 4, 4, 4, 1001] )  # fmt: skip
      decode_text = tokenizer.convert_tokens_to_string(tokens)
      self.assertEqual(text, decode_text)
  
      # for multiple language in one sentence
      text = "Bonjour! Hello! こんにちは!"
      tokens = tokenizer.tokenize(text)
      self.assertListEqual(
          tokens,
          [
              "▁B",
              "on",
              "j",
              "o",
              "ur",
              "!",
              "▁He",
              "ll",
              "o",
              "!",
              "▁",
              "こんにちは",
              "!",
          ],
      )
      encoded_string = tokenizer.encode(text)
      self.assertListEqual(
          encoded_string,
          [
              1000,
              295,
              109,
              999,
              20,
              108,
              146,
              156,
              86,
              20,
              146,
              7,
              0,
              146,
              1001,
          ],
      )
      decode_text = tokenizer.convert_tokens_to_string(tokens)
      self.assertEqual(text, decode_text)
  
      text = "Extra spaces\tand\nline breaks\r\nshould be handled."
      tokens = tokenizer.tokenize(text)
      self.assertListEqual(tokens, ['▁E', 'x', 't', 'r', 'a', '▁sp', 'a', 'ce', 's', '▁and', '▁line', '▁b', 're', 'a', 'k', 's', '▁should', '▁be', '▁hand', 'led', '.'])  # fmt: skip
      encoded_string = tokenizer.encode(text)
      self.assertListEqual(
          encoded_string,
          [
              1000,
              454,
              297,
              14,
              35,
              18,
              277,
              18,
              133,
              6,
              12,
              485,
              84,
              56,
              18,
              45,
              6,
              173,
              36,
              363,
              338,
              4,
              1001,
          ],
      )
      decode_text = tokenizer.convert_tokens_to_string(tokens)
      self.assertEqual(
          "Extra spaces and line breaks should be handled.", decode_text
      )
  
file_path: transformers/tests/models/rembert/test_tokenization_rembert.py
imports: import tempfile
  import unittest
  from tests.test_tokenization_common import AddedToken, TokenizerTesterMixin
  from transformers import RemBertTokenizer, RemBertTokenizerFast
  from transformers.testing_utils import get_tests_dir, require_sentencepiece, require_tokenizers
label_desc: Use image node_id 6 for calling the RemBertTokenizationTest obj's underlying member method code with example usage: obj.test_encode_decode_round_trip() without return types