code: func buildRespForMulticast(to []string, mrs multicastResultsState, mid int) *HttpResponse {
  	resp := &HttpResponse{}
  	resp.MulticastId = mid
  	resp.Results = make([]Result, len(to))
  	for i, regId := range to {
  		result, ok := mrs[regId]
  		if !ok {
  			continue
  		}
  		resp.Results[i] = *result
  		if result.MessageId != "" {
  			resp.Success++
  		} else if result.Error != "" {
  			resp.Failure++
  		}
  		if result.RegistrationId != "" {
  			resp.CanonicalIds++
  		}
  	}
  	return resp
  }
docs: // Builds the final response for a multicast message, in case there have been retries for
  // subsets of the original recipients.