code: def get_main_dir():
      script_path = abspath(sys.modules[__name__].__file__)
      main_dir = split(split(script_path)[0])[0]
  
      return main_dir
  
imports: from __future__ import print_function
  from __future__ import division
  from __future__ import absolute_import
  import sys
  import os
  from os.path import split, abspath
label_desc: Use image node_id 1 for calling a global function with example usage: get_main_dir() and returns: main_dir