import collections


def aggregate(acc):
  """ Aggregates data across workload nodes.

	Args:
	acc (list[dict])

	Returns:
	one final data point (dict).
	"""

  final_datum = collections.defaultdict(float)
  for datum in acc:
    for k, v in datum.items():
      try:
        final_datum[k] += float(v)
      except BaseException:
        print("could not add to csv file key:[{0}], value:[{1}]".format(k, v))
        continue

  for k in final_datum:
    if "ops" not in k:
      final_datum[k] /= len(acc)

  return final_datum