code: def get_model_table_from_auto_modules() -> str:
      """
      Generates an up-to-date model table from the content of the auto modules.
      """
      # Dictionary model names to config.
      config_maping_names = (
          transformers_module.models.auto.configuration_auto.CONFIG_MAPPING_NAMES
      )
      model_name_to_config = {
          name: config_maping_names[code]
          for code, name in transformers_module.MODEL_NAMES_MAPPING.items()
          if code in config_maping_names
      }
      model_name_to_prefix = {
          name: config.replace("Config", "")
          for name, config in model_name_to_config.items()
      }
  
      # Dictionaries flagging if each model prefix has a backend in PT/TF/Flax.
      pt_models = collections.defaultdict(bool)
      tf_models = collections.defaultdict(bool)
      flax_models = collections.defaultdict(bool)
  
      # Let's lookup through all transformers object (once).
      for attr_name in dir(transformers_module):
          lookup_dict = None
          if _re_tf_models.match(attr_name) is not None:
              lookup_dict = tf_models
              attr_name = _re_tf_models.match(attr_name).groups()[0]
          elif _re_flax_models.match(attr_name) is not None:
              lookup_dict = flax_models
              attr_name = _re_flax_models.match(attr_name).groups()[0]
          elif _re_pt_models.match(attr_name) is not None:
              lookup_dict = pt_models
              attr_name = _re_pt_models.match(attr_name).groups()[0]
  
          if lookup_dict is not None:
              while len(attr_name) > 0:
                  if attr_name in model_name_to_prefix.values():
                      lookup_dict[attr_name] = True
                      break
                  # Try again after removing the last word in the name
                  attr_name = "".join(camel_case_split(attr_name)[:-1])
  
      # Let's build that table!
      model_names = list(model_name_to_config.keys()) + list(
          MODEL_NAMES_WITH_SAME_CONFIG.keys()
      )
  
      # model name to doc link mapping
      model_names_mapping = (
          transformers_module.models.auto.configuration_auto.MODEL_NAMES_MAPPING
      )
      model_name_to_link_mapping = {
          value: f"[{value}](model_doc/{key})"
          for key, value in model_names_mapping.items()
      }
      # update mapping with special model names
      model_name_to_link_mapping = {
          k: SPECIAL_MODEL_NAME_LINK_MAPPING[k]
          if k in SPECIAL_MODEL_NAME_LINK_MAPPING
          else v
          for k, v in model_name_to_link_mapping.items()
      }
  
      # MaskFormerSwin and TimmBackbone are backbones and so not meant to be loaded and used on their own. Instead, they define architectures which can be loaded using the AutoBackbone API.
      names_to_exclude = [
          "MaskFormerSwin",
          "TimmBackbone",
          "Speech2Text2",
      ]
      model_names = [
          name for name in model_names if name not in names_to_exclude
      ]
      model_names.sort(key=str.lower)
  
      columns = [
          "Model",
          "PyTorch support",
          "TensorFlow support",
          "Flax Support",
      ]
      # We'll need widths to properly display everything in the center (+2 is to leave one extra space on each side).
  
      widths = [len(c) + 2 for c in columns]
      widths[0] = (
          max(
              [
                  len(doc_link)
                  for doc_link in model_name_to_link_mapping.values()
              ]
          )
          + 2
      )
  
      # Build the table per se
      table = (
          "|"
          + "|".join(
              [_center_text(c, w) for c, w in zip(columns, widths)]
          )
          + "|\n"
      )
      # Use ":-----:" format to center-aligned table cell texts
      table += (
          "|"
          + "|".join([":" + "-" * (w - 2) + ":" for w in widths])
          + "|\n"
      )
  
      check = {True: "✅", False: "❌"}
  
      for name in model_names:
          if name in MODEL_NAMES_TO_IGNORE:
              continue
          if name in MODEL_NAMES_WITH_SAME_CONFIG.keys():
              prefix = model_name_to_prefix[
                  MODEL_NAMES_WITH_SAME_CONFIG[name]
              ]
          else:
              prefix = model_name_to_prefix[name]
          line = [
              model_name_to_link_mapping[name],
              check[pt_models[prefix]],
              check[tf_models[prefix]],
              check[flax_models[prefix]],
          ]
          table += (
              "|"
              + "|".join(
                  [_center_text(l, w) for l, w in zip(line, widths)]
              )
              + "|\n"
          )
      return table
  
file_path: transformers/utils/check_table.py
imports: import argparse
  import collections
  import os
  import re
  from typing import List
  from transformers.utils import direct_transformers_import
label_desc: Use image node_id 4 for calling a global function with example usage: get_model_table_from_auto_modules() and returns: table