code: def __init__(
      self,
      override_config_file: str | None = None,
      override_config_values: str | None = None,
      *,
      validate_schema: bool = True,
      use_version: int = 1,
  ):
      # Load default configuration with latest version.
      self.config = get_default_config(version=use_version)
      spec_module = import_configuration_spec(version=use_version)
  
      # User override configuration
      if override_config_file is not None:
          logger.info(
              "Applying user config override from path: %s"
              % override_config_file
          )
          override = load_config_file(override_config_file)
          if "version" not in override:
              # If users does not define a version, we then by default assume they are using v1
              # and we will migrate it to latest version
              logger.debug(
                  "User config does not define a version, assuming given config is version %d..."
                  % use_version
              )
              current = use_version
          else:
              current = override["version"]
          migration = getattr(
              import_configuration_spec(current), "migration", None
          )
          # Running migration layer if it exists
          if migration is not None:
              override = migration(
                  override_config=dict(flatten_dict(override))
              )
          config_merger.merge(self.config, override)
  
      if override_config_values is not None:
          logger.info(
              "Applying user config override from ENV VAR: %s",
              override_config_values,
          )
          lines = split_with_quotes(
              override_config_values,
              sep=r"\s+",
              quote='"',
              use_regex=True,
          )
          override_config_map = {
              k: yaml.safe_load(v)
              for k, v in [
                  split_with_quotes(line, sep="=", quote='"')
                  for line in lines
                  if line.strip()
              ]
          }
          # Note that this values will only support latest version of configuration,
          # as there is no way for us to infer what values user can pass in.
          # however, if users pass in a version inside this value, we will that to migrate up
          # if possible
          override_version = override_config_map.get(
              "version", use_version
          )
          logger.debug(
              "Found defined 'version=%d' in BENTOML_CONFIG_OPTIONS."
              % override_version
          )
          migration = getattr(
              import_configuration_spec(override_version),
              "migration",
              None,
          )
          # Running migration layer if it exists
          if migration is not None:
              override_config_map = migration(
                  override_config=override_config_map
              )
          # Previous behaviour, before configuration versioning.
          try:
              override = unflatten(override_config_map)
          except ValueError as e:
              raise BentoMLConfigException(
                  f"Failed to parse config options from the env var:\n{e}.\n*** Note: You can use '\"' to quote the key if it contains special characters. ***"
              ) from None
          config_merger.merge(self.config, override)
  
      if (
          override_config_file is not None
          or override_config_values is not None
      ):
          self._finalize()
  
      if validate_schema:
          try:
              spec_module.SCHEMA.validate(self.config)
          except s.SchemaError as e:
              raise BentoMLConfigException(
                  f"Invalid configuration file was given:\n{e}"
              ) from None
  
imports: from __future__ import annotations
  import logging
  import math
  import os
  import typing
  import uuid
  from copy import deepcopy
  from dataclasses import dataclass
  from pathlib import Path
  from typing import TYPE_CHECKING
  import schema
  import yaml
  from deepmerge.merger import Merger
  from simple_di import Provide
  from simple_di import providers
  from ...exceptions import BentoMLConfigException
  from ..context import component_context
  from ..context import trace_context
  from ..resource import CpuResource
  from ..resource import system_resources
  from ..utils import split_with_quotes
  from ..utils import validate_or_create_dir
  from ..utils.unflatten import unflatten
  from .None import expand_env_var
  from .helpers import expand_env_var_in_values
  from .helpers import flatten_dict
  from .helpers import get_default_config
  from .helpers import import_configuration_spec
  from .helpers import load_config_file
label_desc: Use image node_id 1 to create a new BentoMLConfiguration object  with example: obj = BentoMLConfiguration(override_config_file, override_config_values)