code: def add_path_to_sys_path(path, mode, frame):
      assert (
          mode == "unchanged"
          or mode == "relative_to_cwd"
          or mode == "relative_to_current_source_dir"
      )
      if mode == "unchanged":
          if path not in sys.path:
              sys.path.insert(0, path)
      if mode == "relative_to_cwd":
          realpath = os.path.realpath(os.path.abspath(path))
          if realpath not in sys.path:
              sys.path.insert(0, realpath)
      if mode == "relative_to_current_source_dir":
          realpath = os.path.realpath(
              os.path.abspath(
                  os.path.join(
                      os.path.dirname(inspect.getfile(frame)), path
                  )
              )
          )
          if realpath not in sys.path:
              sys.path.insert(0, realpath)
  
label_desc: Use image node_id 1 for calling a global function with example usage: add_path_to_sys_path(path, mode, frame) without return types