code: func failures(records []*k.PutRecordsRequestEntry, response []*k.PutRecordsResultEntry) (out []*k.PutRecordsRequestEntry) {
  	for i, record := range response {
  		if record.ErrorCode != nil {
  			out = append(out, records[i])
  		}
  	}
  	return
  }
docs: // failures returns the failed records as indicated in the response.