code: def combine_recs(rec_list, key):
      
      final_recs = {}
      for rec in rec_list:
          rec_key = rec[key]
          if rec_key in final_recs:
              for k, v in rec.iteritems():
                  if k in final_recs[rec_key] and final_recs[rec_key][k] != v:
                      raise Exception("Mis-match for key '%s'" % k)
                  final_recs[rec_key][k] = v
          else:
              final_recs[rec_key] = rec
      return final_recs.values()
docs: Use a common key to combine a list of recs