def _get_routers_can_schedule(self, context, plugin, routers, l3_agent):
        ids_to_discard = set()
        for router in routers:
            # check if the l3 agent is compatible with the router
            candidates = plugin.get_l3_agent_candidates(
                context, router, [l3_agent])
            if not candidates:
                ids_to_discard.add(router['id'])

        return [r for r in routers if r['id'] not in ids_to_discard]
Get the subset of routers that can be scheduled on the L3 agent.
dataset/ETHPy150Open openstack/neutron/neutron/scheduler/l3_agent_scheduler.py/L3Scheduler._get_routers_can_schedule