code: def test_tokenize(self):
      tokens = self.tokenizer.map_text_to_token("This is a test")
      self.assertListEqual(tokens, ["▁This", "▁is", "▁a", "▁t", "est"])
  
      self.assertListEqual(
          self.tokenizer.map_token_to_id(tokens),
          [285, 46, 10, 170, 382],
      )
  
      tokens = self.tokenizer.map_text_to_token(
          "I was born in 92000, and this is falsé."
      )
      self.assertListEqual(
          tokens,
          [
              SPIECE_UNDERLINE + "I",
              SPIECE_UNDERLINE + "was",
              SPIECE_UNDERLINE + "b",
              "or",
              "n",
              SPIECE_UNDERLINE + "in",
              SPIECE_UNDERLINE + "",
              "9",
              "2",
              "0",
              "0",
              "0",
              ",",
              SPIECE_UNDERLINE + "and",
              SPIECE_UNDERLINE + "this",
              SPIECE_UNDERLINE + "is",
              SPIECE_UNDERLINE + "f",
              "al",
              "s",
              "é",
              ".",
          ],
      )
      ids = self.tokenizer.map_token_to_id(tokens)
      self.assertListEqual(
          ids,
          [
              8,
              21,
              84,
              55,
              24,
              19,
              7,
              0,
              602,
              347,
              347,
              347,
              3,
              12,
              66,
              46,
              72,
              80,
              6,
              0,
              4,
          ],
      )
  
      back_tokens = self.tokenizer.map_id_to_token(ids)
      self.assertListEqual(
          back_tokens,
          [
              SPIECE_UNDERLINE + "I",
              SPIECE_UNDERLINE + "was",
              SPIECE_UNDERLINE + "b",
              "or",
              "n",
              SPIECE_UNDERLINE + "in",
              SPIECE_UNDERLINE + "",
              "<unk>",
              "2",
              "0",
              "0",
              "0",
              ",",
              SPIECE_UNDERLINE + "and",
              SPIECE_UNDERLINE + "this",
              SPIECE_UNDERLINE + "is",
              SPIECE_UNDERLINE + "f",
              "al",
              "s",
              "<unk>",
              ".",
          ],
      )
  
imports: import os
  import pickle
  import tempfile
  import tensorflow
  from texar.tf.data.data_utils import maybe_download
  from texar.tf.data.tokenizers.xlnet_tokenizer import XLNetTokenizer, SPIECE_UNDERLINE
  from texar.tf.utils.test import pretrained_test
label_desc: Use image node_id 4 for calling the XLNetTokenizerTest obj's underlying member method code with example usage: obj.test_tokenize() without return types