code: def resolve_checkpoint(checkpoint_name):
      """
      Find the abosolute path of `checkpoint_name`
  
      For now only supports checkpoint_name where
      checkpoint_name.index is in the file system
      eventually will support checkpoint names that can be referenced
      in a path file.
  
      :param checkpoint_name:
      :return:
      """
  
      if os.path.isfile(checkpoint_name + ".index"):
          return checkpoint_name
      home_folder = NiftyNetGlobalConfig().get_niftynet_home_folder()
      checkpoint_name = to_absolute_path(
          input_path=checkpoint_name, model_root=home_folder
      )
      if os.path.isfile(checkpoint_name + ".index"):
          return checkpoint_name
      raise ValueError("Invalid checkpoint {}".format(checkpoint_name))
  
imports: from __future__ import absolute_import, print_function, unicode_literals
  import errno
  import importlib
  import logging
  import os
  import re
  import sys
  import warnings
  import nibabel
  import numpy
  import pandas
  import scipy.ndimage
  import tensorflow
  from tensorflow.core.framework import summary_pb2
  from niftynet.io.image_loader import load_image_obj
  from niftynet.utilities.niftynet_global_config import NiftyNetGlobalConfig
  from niftynet.utilities.util_import import require_module
label_desc: Use image node_id 21 for calling a global function with example usage: resolve_checkpoint(checkpoint_name) and returns: checkpoint_name, checkpoint_name