code: def init_pretrained(path_to_pretrained, program):
      """
      Init from checkpoints or pretrained model in given path.
      Args:
          path_to_pretrained(str): The path to file of pretrained model.
          program(paddle.static.Program): The program to init model.
      """
      pretrained_model = []
      if not isinstance(path_to_pretrained, list):
          pretrained_model = [path_to_pretrained]
      for pretrain in pretrained_model:
          load_params(program, pretrain)
      logging.info(
          "Finish initalizing pretrained parameters from %s",
          pretrained_model,
      )
  
file_path: DALI/docs/examples/use_cases/paddle/resnet50/utils/save_load.py
imports: import errno
  import os
  import re
  import shutil
  import tempfile
  import logging
  import paddle
label_desc: Use image node_id 5 for calling a global function with example usage: init_pretrained(path_to_pretrained, program) without return types