code: def get_number_of_agents_for_scheduling(self, context):
          
  
          num_agents = len(self.get_l3_agents(context, active=True,
              filters={'agent_modes': [bc.constants.L3_AGENT_MODE_LEGACY,
                                       bc.constants.L3_AGENT_MODE_DVR_SNAT]}))
          max_agents = cfg.CONF.max_l3_agents_per_router
          if max_agents:
              if max_agents > num_agents:
                  LOG.info("Number of active agents lower than "
                           "max_l3_agents_per_router. L3 agents "
                           "available: %s", num_agents)
              else:
                  num_agents = max_agents
  
          return num_agents
docs: Return number of agents on which the router will be scheduled.