code: def to_absolute_path(input_path, model_root):
      """
      Convert `input_path` into a relative path to model_root
      (model_root/input_path) if `input_path` is not an absolute one.
  
      :param input_path:
      :param model_root:
      :return:
      """
      try:
          input_path = os.path.expanduser(input_path)
          model_root = os.path.expanduser(model_root)
          if os.path.isabs(input_path):
              return input_path
      except TypeError:
          pass
      return os.path.abspath(os.path.join(model_root, input_path))
  
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 19 for calling a global function with example usage: to_absolute_path(input_path, model_root) and returns: os, input_path