docstr: Load Config File
  
  Args:
      config (Path): config json/yaml file Path object
  Returns:
      configuration dict object
docstr_tok: ["Load","Config","File","Args",":","config","(","Path",")",":","config","json\/yaml","file","Path","object","Returns",":","configuration","dict","object"]
code: def _load(config: Path) -> dict:
      """
      Load Config File
  
      Args:
          config (Path): config json/yaml file Path object
      Returns:
          configuration dict object
      """
      extension = config.suffix.lower()
      if extension == ".json":
          with open(str(config)) as file:
              data = json.load(file)
      elif extension == ".yml":
          with open(str(config)) as file:
              data = yaml.load(file, Loader=yaml.SafeLoader)
      else:
          raise CompilerException(
              "Unsupported config file, %s" % config
          )
  
      validate(instance=data, schema=Configuration.SCHEMA)
      return data
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import warnings
  import json
  from enum import Enum
  from importlib import import_module
  from pathlib import Path
  import numpy
  import pandas
  import yaml
  from jsonschema import validate
  from xai.exception import CompilerException
  from xai.formatter import Report
label_desc: Use image node_id 1 for calling the Configuration obj's underlying member method code with example usage: obj._load(config) and returns: data