code: def matrix_class_distance(dat, dat_filter, dat_points, iterations):
      aggregation = 0
      for i in range(iterations):
          aggregation += np.sum(
              np.linalg.norm(
                  dat[dat_filter == i] - dat_points[i], axis=1
              )
          )
      return aggregation
  
label_desc: Use image node_id 1 for calling a global function with example usage: matrix_class_distance(dat, dat_filter, dat_points, iterations) and returns: aggregation