code: def parse_from_yaml(path: str):
      """Parse a yaml file and build config"""
      with codecs.open(path, "r", "utf-8") as file:
          dic = yaml.load(file, Loader=yaml.FullLoader)
  
      if _BASE_KEY in dic:
          base_files = dic.pop(_BASE_KEY)
          if isinstance(base_files, str):
              base_files = [base_files]
          for bf in base_files:
              base_path = os.path.join(os.path.dirname(path), bf)
              base_dic = parse_from_yaml(base_path)
              dic = merge_config_dicts(dic, base_dic)
  
      return dic
  
imports: import six
  import codecs
  import os
  from ast import literal_eval
  from typing import Any, Dict, Optional
  import yaml
  import paddle
  from paddleseg.cvlibs import config_checker
  from paddleseg.cvlibs import manager
  from paddleseg.utils import logger, utils
label_desc: Use image node_id 1 for calling a global function with example usage: parse_from_yaml(path) and returns: dic