code: func validateSelectedConfigs(configs []priorities.PriorityConfig) error {
  	var totalPriority int
  	for _, config := range configs {
  		// Checks totalPriority against MaxTotalPriority to avoid overflow
  		if config.Weight*schedulerapi.MaxPriority > schedulerapi.MaxTotalPriority-totalPriority {
  			return fmt.Errorf("total priority of priority functions has overflown")
  		}
  		totalPriority += config.Weight * schedulerapi.MaxPriority
  	}
  	return nil
  }
docs: // validateSelectedConfigs validates the config weights to avoid the overflow.