def walk_dict(
    node: Dict[str, Any], parent: List[str] = [], *, for_overrides: bool = False
) -> Iterator[Tuple[List[str], Any]]:
    """Walk a dict and yield the path and values of the leaves.

    for_overrides (bool): Whether to treat registered functions that start with
        @ as final values rather than dicts to traverse.
    """
    for key, value in node.items():
        key_parent = [*parent, key]
        if isinstance(value, dict) and (
            not for_overrides
            or not any(value_key.startswith("@") for value_key in value)
        ):
            yield from walk_dict(value, key_parent, for_overrides=for_overrides)
        else:
            yield (key_parent, value)
Walk a dict and yield the path and values of the leaves.

    for_overrides (bool): Whether to treat registered functions that start with
        @ as final values rather than dicts to traverse.
    
spacy/util.py