code: def __resolve_config_file_path(cmdline_arg):
      """
      Search for the absolute file name of the configuration file.
      starting from `-c` value provided by the user.
  
      :param cmdline_arg:
      :return:
      """
      if not cmdline_arg:
          raise IOError(
              "\nNo configuration file has been provided, did you "
              "forget '-c' command argument?{}".format(EPILOG_STRING)
          )
      # Resolve relative configuration file location
      config_file_path = os.path.expanduser(cmdline_arg)
      try:
          config_file_path = resolve_file_name(
              config_file_path, (".", NIFTYNET_HOME)
          )
          if os.path.isfile(config_file_path):
              return config_file_path
      except (IOError, TypeError):
          config_file_path = os.path.expanduser(cmdline_arg)
  
      config_file_path = os.path.join(
          NiftyNetGlobalConfig().get_default_examples_folder(),
          config_file_path,
          config_file_path + "_config.ini",
      )
      if os.path.isfile(config_file_path):
          return config_file_path
  
      # could not proceed without a configuration file
      raise IOError(
          "\nConfiguration file not found: {}.{}".format(
              os.path.expanduser(cmdline_arg), EPILOG_STRING
          )
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import argparse
  import os
  import textwrap
  from niftynet.engine.signal import TRAIN, INFER, EVAL
  from niftynet.utilities.util_common import look_up_operations
  from niftynet.engine.application_factory import ApplicationFactory
  from niftynet.engine.application_factory import SUPPORTED_APP
  from niftynet.io.misc_io import resolve_file_name
  from niftynet.utilities.niftynet_global_config import NiftyNetGlobalConfig
  from niftynet.utilities import NiftyNetLaunchConfig
  from niftynet.utilities.user_parameters_custom import SUPPORTED_ARG_SECTIONS
  from niftynet.utilities.user_parameters_custom import add_customised_args
  from niftynet.utilities.user_parameters_default import SUPPORTED_DEFAULT_SECTIONS
  from niftynet.utilities.user_parameters_default import add_input_data_args
  from niftynet.utilities.user_parameters_helper import has_section_in_config
  from niftynet.utilities.user_parameters_helper import standardise_section_name
  from niftynet.utilities.util_common import damerau_levenshtein_distance
  from niftynet.utilities.versioning import get_niftynet_version_string
label_desc: Use image node_id 7 for calling a global function with example usage: __resolve_config_file_path(cmdline_arg) and returns: config_file_path, config_file_path