code: def _load_config_with_base(file_path):
      with open(file_path) as f:
          file_cfg = yaml.load(f, Loader=yaml.Loader)
  
      # NOTE: cfgs outside have higher priority than cfgs in _BASE_
      if BASE_KEY in file_cfg:
          all_base_cfg = AttrDict()
          base_ymls = list(file_cfg[BASE_KEY])
          for base_yml in base_ymls:
              if base_yml.startswith("~"):
                  base_yml = os.path.expanduser(base_yml)
              if not base_yml.startswith("/"):
                  base_yml = os.path.join(
                      os.path.dirname(file_path), base_yml
                  )
  
              with open(base_yml) as f:
                  base_cfg = _load_config_with_base(base_yml)
                  all_base_cfg = merge_config(base_cfg, all_base_cfg)
  
          del file_cfg[BASE_KEY]
          return merge_config(file_cfg, all_base_cfg)
  
      return file_cfg
  
imports: from __future__ import absolute_import
  from __future__ import print_function
  from __future__ import division
  import importlib
  import os
  import sys
  import yaml
  import collections
  from .config.schema import SchemaDict, SharedConfig, extract_schema
  from .config.yaml_helpers import serializable
label_desc: Use image node_id 2 for calling a global function with example usage: _load_config_with_base(file_path) and returns: file_cfg, merge_config