code: def init_pretraining_params(
      exe, pretraining_params_path, main_program, use_fp16=False
  ):
      """init"""
      assert os.path.exists(pretraining_params_path), (
          "[%s] cann't be found." % pretraining_params_path
      )
  
      def existed_params(var):
          """doc"""
          if not isinstance(var, fluid.framework.Parameter):
              return False
          return os.path.exists(
              os.path.join(pretraining_params_path, var.name)
          )
  
      fluid.io.load_vars(
          exe,
          pretraining_params_path,
          main_program=main_program,
          predicate=existed_params,
      )
      log.info(
          "Load pretraining parameters from {}.".format(
              pretraining_params_path
          )
      )
  
      if use_fp16:
          cast_fp32_to_fp16(exe, main_program)
  
file_path: PGL/ogb_examples/linkproppred/ogbl-ppa/utils/init.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from __future__ import unicode_literals
  from __future__ import absolute_import
  import os
  import six
  import ast
  import copy
  import logging
  import numpy
  import paddle.fluid
label_desc: Use image node_id 3 for calling a global function with example usage: init_pretraining_params(exe, pretraining_params_path, main_program, use_fp16) and returns: os, False