code: def touch_folder(model_dir):
      """
      This function returns the absolute path of `model_dir` if exists
      otherwise try to create the folder and returns the absolute path.
      """
      model_dir = os.path.expanduser(model_dir)
      if not os.path.exists(model_dir):
          try:
              os.makedirs(model_dir)
          except (OSError, TypeError):
              tf.logging.fatal(
                  "could not create model folder: %s", model_dir
              )
              raise
      absolute_dir = os.path.abspath(model_dir)
      # tf.logging.info('accessing output folder: {}'.format(absolute_dir))
      return absolute_dir
  
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 17 for calling a global function with example usage: touch_folder(model_dir) and returns: absolute_dir