code: def test_tokenizer(self, gpt_model, test_text):
      assert isinstance(gpt_model.tokenizer, AutoTokenizer)
      assert gpt_model.tokenizer.name == "GPT2Tokenizer"
      assert gpt_model.tokenizer.vocab_size == 50257
  
      ids = [
          gpt_model.tokenizer.text_to_ids(text) for text in test_text
      ]
  
      true_ids = [
          [31373, 11, 995],
          [14337, 4776, 290, 3598, 812, 2084],
          [7120, 640, 318, 3614],
          [1532, 345, 900, 4661, 2266, 291, 18117, 1029],
      ]
      assert (
          sum(
              [
                  id_list == true_id_list
                  for id_list, true_id_list in zip(ids, true_ids)
              ]
          )
          == 4
      )
  
file_path: NeMo/tests/collections/nlp/test_gpt_model.py
imports: import os
  import pytest
  import torch
  from omegaconf import DictConfig
  from pytorch_lightning import Trainer
  from nemo.collections.common.tokenizers.huggingface.auto_tokenizer import AutoTokenizer
  from nemo.collections.nlp.models.language_modeling.megatron_gpt_model import MegatronGPTModel
  from nemo.collections.nlp.modules.common.megatron.utils import get_ltor_masks_and_position_ids
  from nemo.collections.nlp.parts.nlp_overrides import NLPDDPStrategy
label_desc: Use image node_id 2 for calling the TestGPTModel obj's underlying member method code with example usage: obj.test_tokenizer(gpt_model, test_text) without return types