code: func GetAllReplicaSets(deployment *appsv1.Deployment, c appsclient.AppsV1Interface) ([]*appsv1.ReplicaSet, []*appsv1.ReplicaSet, *appsv1.ReplicaSet, error) {
  	rsList, err := listReplicaSets(deployment, rsListFromClient(c))
  	if err != nil {
  		return nil, nil, nil, err
  	}
  	oldRSes, allOldRSes := findOldReplicaSets(deployment, rsList)
  	newRS := findNewReplicaSet(deployment, rsList)
  	return oldRSes, allOldRSes, newRS, nil
  }
docs: // GetAllReplicaSets returns the old and new replica sets targeted by the given Deployment. It gets PodList and
  // ReplicaSetList from client interface. Note that the first set of old replica sets doesn't include the ones
  // with no pods, and the second set of old replica sets include all old replica sets. The third returned value
  // is the new replica set, and it may be nil if it doesn't exist yet.