code: def get_from_nested_config(config: DictConfig, keymap: list) -> Any:
      """Retrieves an item from a nested config object using a list of keys.
  
      Args:
          config: DictConfig: nested DictConfig object
          keymap: list[str]: list of keys corresponding to item that should be retrieved.
      """
      return reduce(operator.getitem, keymap, config)
  
file_path: anomalib/src/anomalib/utils/sweep/config.py
imports: from __future__ import annotations
  import itertools
  import operator
  from collections.abc import Iterable, ValuesView
  from functools import reduce
  from typing import Any, Generator
  from omegaconf import DictConfig
label_desc: Use image node_id 4 for calling a global function with example usage: get_from_nested_config(config, keymap) and returns: reduce