def METHOD_NAME(cfg, config_mods):
    for path, value in iterate_flattened_separately(cfg, ["__doc__"]):
        if value is PATHCHANGE:
            yield path, PathEntry(
                key=path.rpartition(".")[2],
                added=path in config_mods.added,
                modified=path in config_mods.modified,
                typechanged=config_mods.typechanged.get(path),
                doc=config_mods.docs.get(path),
            )
        else:
            yield path, ConfigEntry(
                key=path.rpartition(".")[2],
                value=value,
                added=path in config_mods.added,
                modified=path in config_mods.modified,
                typechanged=config_mods.typechanged.get(path),
                doc=config_mods.docs.get(path),
            )