code: def load_pretrained_weights(model_name, checkpoint_path=None):
      checkpoint_path = checkpoint_path or CHECKPOINTS.get(model_name)
      loaded_state = checkpoints.load_t5x_checkpoint(checkpoint_path)[
          "target"
      ]
      loaded_state = {"params": {"t5_module": loaded_state}}
      return loaded_state
  
file_path: scenic/scenic/projects/t5/model.py
imports: from scenic.projects.t5 import layers
  from t5x import checkpoints
label_desc: Use image node_id 16 for calling a global function with example usage: load_pretrained_weights(model_name, checkpoint_path) and returns: loaded_state