def METHOD_NAME(
    zone_config: dict,
) -> Dict[str, Dict[str, Dict[str, str]]]:
    zone_sources = zone_config.get("sources", {})
    def _get_sources_for_type(_type: str) -> Dict[str, Dict[str, str]]:
        sources = {}
        for mode, ef in zone_config.get("emissionFactors", {}).get(_type, {}).items():
            sources_per_mode = {}
            if isinstance(ef, list):
                for _ef in ef:
                    for s in zone_sources:
                        if s in _ef.get("source"):
                            sources_per_mode[s] = zone_sources[s].get("link")
            else:
                for s in zone_sources:
                    if s in ef.get("source"):
                        sources_per_mode[s] = zone_sources[s].get("link")
            if sources_per_mode != {}:
                sources[mode] = sources_per_mode
        return sources
    sources = {
        "direct": _get_sources_for_type("direct"),
        "lifecycle": _get_sources_for_type("lifecycle"),
    }
    if sources["direct"] == {}:
        del sources["direct"]
    if sources["lifecycle"] == {}:
        del sources["lifecycle"]
    return sources