code: func WeightRandomPolicy(weights []int) GroupPolicyHandler {
  	var rands = make([]int, 0, len(weights))
  	for i := 0; i < len(weights); i++ {
  		for n := 0; n < weights[i]; n++ {
  			rands = append(rands, i)
  		}
  	}
  	var r = rand.New(rand.NewSource(time.Now().UnixNano()))
  
  	return func(g *EngineGroup) *Engine {
  		var slaves = g.Slaves()
  		idx := rands[r.Intn(len(rands))]
  		if idx >= len(slaves) {
  			idx = len(slaves) - 1
  		}
  		return slaves[idx]
  	}
  }
docs: // WeightRandomPolicy implmentes randomly chose the slave of slaves