code: func ServiceWithMaxReplicas(n uint64) ServiceSpecOpt {
  	return func(spec *swarmtypes.ServiceSpec) {
  		ensurePlacement(spec)
  		spec.TaskTemplate.Placement.MaxReplicas = n
  	}
  }
docs: // ServiceWithMaxReplicas sets the max replicas for the service