code: def calculateCentroid(cluster):
      reduce_coord = lambda i: reduce(
          lambda x, p: x + p[i], cluster, 0.0
      )
      centroid_coords = [
          reduce_coord(i) / len(cluster) for i in range(len(cluster[0]))
      ]
      return centroid_coords
  
imports: import math, random
  from functools import reduce
label_desc: Use image node_id 1 for calling a global function with example usage: calculateCentroid(cluster) and returns: centroid_coords