code: def _load_state(path):
      """
      Load model parameters from .pdparams file.
      Args:
          path(str): Path to .pdparams file.
      Returns:
          state(dict): Dict of parameters loaded from file.
      """
      if os.path.exists(path + _PDOPT_SUFFIX):
          tmp = tempfile.mkdtemp()
          dst = os.path.join(
              tmp, os.path.basename(os.path.normpath(path))
          )
          shutil.copy(path + _PDPARAMS_SUFFIX, dst + _PDPARAMS_SUFFIX)
          state = paddle.static.load_program_state(dst)
          shutil.rmtree(tmp)
      else:
          state = paddle.static.load_program_state(path)
      return state
  
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 2 for calling a global function with example usage: _load_state(path) and returns: state