code: func ServiceWithReplicas(n uint64) ServiceSpecOpt {
  	return func(spec *swarmtypes.ServiceSpec) {
  		spec.Mode = swarmtypes.ServiceMode{
  			Replicated: &swarmtypes.ReplicatedService{
  				Replicas: &n,
  			},
  		}
  	}
  }
docs: // ServiceWithReplicas sets the replicas for the service