code: def save_configs(path=None, config=None, actions=None):
      if not path:
          path = osp.join(pjpath, "config/config.yaml")
      if not osp.exists(path):
          # os.makedirs(osp.basename(path))
          # windows无法使用mknod
          f = open(path, "w+")
          f.close()
      if not config:
          config = {}
      if actions:
          config["shortcut"] = {}
          for action in actions:
              config["shortcut"][
                  action.data()
              ] = action.shortcut().toString()
      with open(path, "w", encoding="utf-8") as f:
          yaml.dump(config, f)
  
file_path: PaddleSeg/EISeg/eiseg/util/config.py
imports: import yaml
  import os.path
  import os
  from eiseg import pjpath
label_desc: Use image node_id 2 for calling a global function with example usage: save_configs(path, config, actions) without return types