code: def get_base_dir(currfile, dir_level_num=3):
      
      root_path = os.path.abspath(currfile)
      for i in range(0, dir_level_num):
          root_path = os.path.dirname(root_path)
  
      return root_path
docs: find certain path according to currfile