code: def get_tiny_model_summary_from_hub(output_path):
      special_models = COMPOSITE_MODELS.values()
  
      # All tiny model base names on Hub
      model_names = get_all_model_names()
      models = hf_api.list_models(
          filter=ModelFilter(
              author="hf-internal-testing",
          )
      )
      _models = set()
      for x in models:
          model = x.modelId
          org, model = model.split("/")
          if not model.startswith("tiny-random-"):
              continue
          model = model.replace("tiny-random-", "")
          if not model[0].isupper():
              continue
          if model not in model_names and model not in special_models:
              continue
          _models.add(model)
  
      models = sorted(_models)
      # All tiny model names on Hub
      summary = {}
      for model in models:
          repo_id = f"hf-internal-testing/tiny-random-{model}"
          model = model.split("-")[0]
          try:
              repo_info = hf_api.repo_info(repo_id)
              content = {
                  "tokenizer_classes": set(),
                  "processor_classes": set(),
                  "model_classes": set(),
                  "sha": repo_info.sha,
              }
          except Exception:
              continue
          try:
              time.sleep(1)
              tokenizer_fast = AutoTokenizer.from_pretrained(repo_id)
              content["tokenizer_classes"].add(
                  tokenizer_fast.__class__.__name__
              )
          except Exception:
              pass
          try:
              time.sleep(1)
              tokenizer_slow = AutoTokenizer.from_pretrained(
                  repo_id, use_fast=False
              )
              content["tokenizer_classes"].add(
                  tokenizer_slow.__class__.__name__
              )
          except Exception:
              pass
          try:
              time.sleep(1)
              img_p = AutoImageProcessor.from_pretrained(repo_id)
              content["processor_classes"].add(img_p.__class__.__name__)
          except Exception:
              pass
          try:
              time.sleep(1)
              feat_p = AutoFeatureExtractor.from_pretrained(repo_id)
              if not isinstance(feat_p, BaseImageProcessor):
                  content["processor_classes"].add(
                      feat_p.__class__.__name__
                  )
          except Exception:
              pass
          try:
              time.sleep(1)
              model_class = getattr(transformers, model)
              m = model_class.from_pretrained(repo_id)
              content["model_classes"].add(m.__class__.__name__)
          except Exception:
              pass
          try:
              time.sleep(1)
              model_class = getattr(transformers, f"TF{model}")
              m = model_class.from_pretrained(repo_id)
              content["model_classes"].add(m.__class__.__name__)
          except Exception:
              pass
  
          content["tokenizer_classes"] = sorted(
              content["tokenizer_classes"]
          )
          content["processor_classes"] = sorted(
              content["processor_classes"]
          )
          content["model_classes"] = sorted(content["model_classes"])
  
          summary[model] = content
          with open(
              os.path.join(output_path, "hub_tiny_model_summary.json"),
              "w",
          ) as fp:
              json.dump(summary, fp, ensure_ascii=False, indent=4)
  
file_path: transformers/utils/update_tiny_models.py
imports: import argparse
  import copy
  import json
  import multiprocessing
  import os
  import time
  from create_dummy_models import COMPOSITE_MODELS, create_tiny_models
  from huggingface_hub import ModelFilter, hf_api
  import transformers
  from transformers import AutoFeatureExtractor, AutoImageProcessor, AutoTokenizer
  from transformers.image_processing_utils import BaseImageProcessor
label_desc: Use image node_id 3 for calling a global function with example usage: get_tiny_model_summary_from_hub(output_path) without return types