code: def load_config_file(path: str) -> dict[str, t.Any]:
      """Load configuration from given path."""
      if not os.path.exists(path):
          raise BentoMLConfigException(
              "Configuration file %s not found." % path
          ) from None
      with open(path, "rb") as f:
          config = yaml.safe_load(f)
      return config
  
imports: from __future__ import annotations
  import ipaddress
  import logging
  import os
  import re
  import typing
  from functools import singledispatch
  from typing import TYPE_CHECKING
  import schema
  import yaml
  from ...exceptions import BentoMLConfigException
  from ..utils import LazyLoader
label_desc: Use image node_id 6 for calling a global function with example usage: load_config_file(path) and returns: config