code: func GetAvailableReplicaCountForReplicaSets(replicaSets []*apps.ReplicaSet) int32 {
  	totalAvailableReplicas := int32(0)
  	for _, rs := range replicaSets {
  		if rs != nil {
  			totalAvailableReplicas += rs.Status.AvailableReplicas
  		}
  	}
  	return totalAvailableReplicas
  }
docs: // GetAvailableReplicaCountForReplicaSets returns the number of available pods corresponding to the given replica sets.