code: def apply_overrides(path: "StrPath", overrides: List[str]) -> None:
      """Update `path` params with the provided `Hydra Override`_ patterns.
  
      Args:
          overrides: List of `Hydra Override`_ patterns.
  
      .. _Hydra Override:
          https://hydra.cc/docs/next/advanced/override_grammar/basic/
      """
      from hydra._internal.config_loader_impl import ConfigLoaderImpl
      from hydra.errors import (
          ConfigCompositionException,
          OverrideParseException,
      )
      from omegaconf import OmegaConf
  
      from .serialize import MODIFIERS
  
      suffix = Path(path).suffix.lower()
  
      hydra_errors = (
          ConfigCompositionException,
          OverrideParseException,
      )
  
      modify_data = MODIFIERS[suffix]
      with modify_data(path) as original_data:
          try:
              parsed = to_hydra_overrides(overrides)
  
              new_data = OmegaConf.create(
                  to_omegaconf(original_data),
                  flags={"allow_objects": True},
              )
              OmegaConf.set_struct(new_data, True)
  
              ConfigLoaderImpl._apply_overrides_to_config(
                  parsed, new_data
              )
              new_data = OmegaConf.to_object(new_data)
          except hydra_errors as e:
              raise InvalidArgumentError(
                  "Invalid `--set-param` value"
              ) from e
  
          merge_dicts(original_data, new_data)
          remove_missing_keys(original_data, new_data)
  
file_path: dvc/dvc/utils/hydra.py
imports: from pathlib import Path
  from typing import TYPE_CHECKING, List, Optional
  from dvc.exceptions import InvalidArgumentError
  from dvc.log import logger
  from .collections import merge_dicts, remove_missing_keys, to_omegaconf
label_desc: Use image node_id 2 for calling a global function with example usage: apply_overrides(path, overrides) without return types