code: def get_checkpoint_from_config_class(config_class):
      checkpoint = None
  
      # source code of `config_class`
      config_source = inspect.getsource(config_class)
      checkpoints = _re_checkpoint.findall(config_source)
  
      # Each `checkpoint` is a tuple of a checkpoint name and a checkpoint link.
      # For example, `('bert-base-uncased', 'https://huggingface.co/bert-base-uncased')`
      for ckpt_name, ckpt_link in checkpoints:
          # allow the link to end with `/`
          if ckpt_link.endswith("/"):
              ckpt_link = ckpt_link[:-1]
  
          # verify the checkpoint name corresponds to the checkpoint link
          ckpt_link_from_name = f"https://huggingface.co/{ckpt_name}"
          if ckpt_link == ckpt_link_from_name:
              checkpoint = ckpt_name
              break
  
      return checkpoint
  
imports: import inspect
  import re
  from transformers.utils import direct_transformers_import
label_desc: Use image node_id 1 for calling a global function with example usage: get_checkpoint_from_config_class(config_class) and returns: checkpoint