code: func GetReplicaCountForReplicaSets(replicaSets []*apps.ReplicaSet) int32 {
  	totalReplicas := int32(0)
  	for _, rs := range replicaSets {
  		if rs != nil {
  			totalReplicas += *(rs.Spec.Replicas)
  		}
  	}
  	return totalReplicas
  }
docs: // GetReplicaCountForReplicaSets returns the sum of Replicas of the given replica sets.