class_docstr: Tests OpenAIGPTTokenizer that uses BERT BasicTokenizer.
class_docstr_tok: ["Tests","OpenAIGPTTokenizer","that","uses","BERT","BasicTokenizer","."]
code: def setUp(self):
      super().setUp()
  
      # Adapted from Sennrich et al. 2015 and https://github.com/rsennrich/subword-nmt
      vocab = [
          "l",
          "o",
          "w",
          "e",
          "r",
          "s",
          "t",
          "i",
          "d",
          "n",
          "w</w>",
          "r</w>",
          "t</w>",
          "lo",
          "low",
          "er</w>",
          "low</w>",
          "lowest</w>",
          "newer</w>",
          "wider</w>",
          "<unk>",
      ]
      vocab_tokens = dict(zip(vocab, range(len(vocab))))
      merges = ["#version: 0.2", "l o", "lo w", "e r</w>", ""]
  
      self.vocab_file = os.path.join(
          self.tmpdirname, VOCAB_FILES_NAMES["vocab_file"]
      )
      self.merges_file = os.path.join(
          self.tmpdirname, VOCAB_FILES_NAMES["merges_file"]
      )
      with open(self.vocab_file, "w") as fp:
          fp.write(json.dumps(vocab_tokens))
      with open(self.merges_file, "w") as fp:
          fp.write("\n".join(merges))
  
file_path: transformers/tests/models/openai/test_tokenization_openai.py
imports: import json
  import os
  import unittest
  from transformers import OpenAIGPTTokenizer, OpenAIGPTTokenizerFast
  from transformers.models.openai.tokenization_openai import VOCAB_FILES_NAMES
  from transformers.testing_utils import require_ftfy, require_spacy, require_tokenizers
  from ...test_tokenization_common import TokenizerTesterMixin
label_desc: Use image node_id 1 for calling the OpenAIGPTTokenizationTest obj's underlying member method code with example usage: obj.setUp() without return types