code: def test_retrieve_model_classes(self):
      gpt_classes = {
          k: set(v) for k, v in retrieve_model_classes("gpt2").items()
      }
      expected_gpt_classes = {
          "pt": {
              "GPT2ForTokenClassification",
              "GPT2Model",
              "GPT2LMHeadModel",
              "GPT2ForSequenceClassification",
          },
          "tf": {
              "TFGPT2Model",
              "TFGPT2ForSequenceClassification",
              "TFGPT2LMHeadModel",
          },
          "flax": {"FlaxGPT2Model", "FlaxGPT2LMHeadModel"},
      }
      self.assertEqual(gpt_classes, expected_gpt_classes)
  
      del expected_gpt_classes["flax"]
      gpt_classes = {
          k: set(v)
          for k, v in retrieve_model_classes(
              "gpt2", frameworks=["pt", "tf"]
          ).items()
      }
      self.assertEqual(gpt_classes, expected_gpt_classes)
  
      del expected_gpt_classes["pt"]
      gpt_classes = {
          k: set(v)
          for k, v in retrieve_model_classes(
              "gpt2", frameworks=["tf"]
          ).items()
      }
      self.assertEqual(gpt_classes, expected_gpt_classes)
  
imports: import os
  import re
  import tempfile
  import unittest
  from pathlib import Path
  import transformers
  from transformers.commands.add_new_model_like import ModelPatterns, _re_class_func, add_content_to_file, add_content_to_text, clean_frameworks_in_init, duplicate_doc_file, duplicate_module, filter_framework_files, find_base_model_checkpoint, get_model_files, get_module_from_file, parse_module_content, replace_model_patterns, retrieve_info_for_model, retrieve_model_classes, simplify_replacements
  from transformers.testing_utils import require_flax, require_tf, require_torch
label_desc: Use image node_id 18 for calling the TestAddNewModelLike obj's underlying member method code with example usage: obj.test_retrieve_model_classes() without return types