code: def test_encode_decode(self):
      tokenizer = GPT2Tokenizer.load(
          self.tmp_dir.name, self.special_tokens_map
      )
  
      input_text = "lower newer"
      output_text = "lower<unk>newer"
  
      tokens = tokenizer.map_text_to_token(input_text)
      ids = tokenizer.map_token_to_id(tokens)
      ids_2 = tokenizer.map_text_to_id(input_text)
      self.assertListEqual(ids, ids_2)
  
      tokens_2 = tokenizer.map_id_to_token(ids)
      text_2 = tokenizer.map_id_to_text(ids)
  
      self.assertEqual(text_2, output_text)
  
      self.assertNotEqual(len(tokens_2), 0)
      self.assertIsInstance(text_2, str)
  
file_path: texar/tests/data/tokenizers/gpt2_tokenizer_test.py
imports: import json
  import os
  import pickle
  import tempfile
  import tensorflow
  from texar.tf.data.tokenizers.gpt2_tokenizer import GPT2Tokenizer
  from texar.tf.utils.test import pretrained_test
label_desc: Use image node_id 8 for calling the GPT2TokenizerTest obj's underlying member method code with example usage: obj.test_encode_decode() without return types