(
    root: Dict[str, Any], fqn: List[str]
)
Iterate into a nested dictionary, looking for keys in the fqn as levels.
    Yield the level config.
Iterate into a nested dictionary, looking for keys in the fqn as levels.
    Yield the level config.
Iterate into a nested dictionary looking for keys in the fqn as levels . Yield the level config .
def fqn_search(
    root: Dict[str, Any], fqn: List[str]
) -> Iterator[Dict[str, Any]]:
    """Iterate into a nested dictionary, looking for keys in the fqn as levels.
    Yield the level config.
    """
    yield root

    for level in fqn:
        level_config = root.get(level, None)
        if not isinstance(level_config, dict):
            break
        # This used to do a 'deepcopy',
        # but it didn't seem to be necessary
        yield level_config
        root = level_config
def fqn_search ( root : Dict [ str , Any ] , fqn : List [ str ] ) -> Iterator [ Dict [ str , Any ] ] : yield root for level in fqn : level_config = root . get ( level , None ) if not isinstance ( level_config , dict ) : break # This used to do a 'deepcopy', # but it didn't seem to be necessary yield level_config root = level_config