code: def load_test_checkpoint(cfg, model):
      """
      Loading checkpoint logic for testing.
      """
      # Load a checkpoint to test if applicable.
      if cfg.TEST.CHECKPOINT_FILE_PATH != "":
          # If no checkpoint found in MODEL_VIS.CHECKPOINT_FILE_PATH or in the current
          # checkpoint folder, try to load checkpoint from
          # TEST.CHECKPOINT_FILE_PATH and test it.
          load_checkpoint(
              cfg.TEST.CHECKPOINT_FILE_PATH,
              model,
              cfg.NUM_GPUS > 1,
              None,
              inflation=False,
              convert_from_caffe2=cfg.TEST.CHECKPOINT_TYPE == "caffe2",
          )
      elif has_checkpoint(cfg.OUTPUT_DIR):
          last_checkpoint = get_last_checkpoint(
              cfg.OUTPUT_DIR, cfg.TASK
          )
          load_checkpoint(last_checkpoint, model, cfg.NUM_GPUS > 1)
      elif cfg.TRAIN.CHECKPOINT_FILE_PATH != "":
          # If no checkpoint found in TEST.CHECKPOINT_FILE_PATH or in the current
          # checkpoint folder, try to load checkpoint from
          # TRAIN.CHECKPOINT_FILE_PATH and test it.
          load_checkpoint(
              cfg.TRAIN.CHECKPOINT_FILE_PATH,
              model,
              cfg.NUM_GPUS > 1,
              None,
              inflation=False,
              convert_from_caffe2=cfg.TRAIN.CHECKPOINT_TYPE == "caffe2",
          )
      else:
          logger.info(
              "Unknown way of loading checkpoint. Using with random initialization, only for debugging."
          )
  
imports: import copy
  import math
  import numpy
  import os
  import pickle
  from collections import OrderedDict
  import torch
  import slowfast.utils.distributed
  import slowfast.utils.logging
  from slowfast.utils.c2_model_loading import get_name_convert_func
  from slowfast.utils.env import checkpoint_pathmgr
label_desc: Use image node_id 13 for calling a global function with example usage: load_test_checkpoint(cfg, model) without return types