code: func (s *genericScaler) Scale(namespace, resourceName string, newSize uint, preconditions *ScalePrecondition, retry, waitForReplicas *RetryParams, gr schema.GroupResource) error {
  	if retry == nil {
  		// make it try only once, immediately
  		retry = &RetryParams{Interval: time.Millisecond, Timeout: time.Millisecond}
  	}
  	cond := ScaleCondition(s, preconditions, namespace, resourceName, newSize, nil, gr)
  	if err := wait.PollImmediate(retry.Interval, retry.Timeout, cond); err != nil {
  		return err
  	}
  	if waitForReplicas != nil {
  		return WaitForScaleHasDesiredReplicas(s.scaleNamespacer, gr, resourceName, namespace, newSize, waitForReplicas)
  	}
  	return nil
  }
docs: // Scale updates a scale of a given resource to a new size, with optional precondition check (if preconditions is not nil),
  // optional retries (if retry is not nil), and then optionally waits for the status to reach desired count.