def METHOD_NAME(avd_switch_facts: dict) -> tuple[dict, dict]:
    """
    Build dicts of underlay and overlay peerings based on avd_switch_facts
    Args:
        avd_switch_facts: Nested Dictionaried with rendered "avd_switch_facts" per device.
            ```python
            {
                "<hostname1>": {"switch": dict},
                "<hostname2>": {"switch": dict},
                ...
            }
            ```
    Returns:
        avd_overlay_peers: dict
            hostname1 : list[str]
                List of switches pointing to hostname1 as route server / route reflector
            hostname2 : list[str]
                List of switches pointing to hostname2 as route server / route reflector
        avd_topology_peers: dict
            hostname1 : list[str]
                List of switches having hostname1 as uplink_switch
            hostname2 : list[str]
                List of switches having hostname2 as uplink_switch
    """
    avd_overlay_peers = {}
    avd_topology_peers = {}
    for hostname in avd_switch_facts:
        host_evpn_route_servers = avd_switch_facts[hostname]["switch"].get("evpn_route_servers", [])
        for peer in host_evpn_route_servers:
            avd_overlay_peers.setdefault(peer, []).append(hostname)
        host_mpls_route_reflectors = avd_switch_facts[hostname]["switch"].get("mpls_route_reflectors", [])
        for peer in host_mpls_route_reflectors:
            avd_overlay_peers.setdefault(peer, []).append(hostname)
        host_topology_peers = avd_switch_facts[hostname]["switch"].get("uplink_peers", [])
        for peer in host_topology_peers:
            avd_topology_peers.setdefault(peer, []).append(hostname)
    return avd_overlay_peers, avd_topology_peers