code: def avg_IOU(anns, centroids):
      n, d = anns.shape
      sum = 0.0
  
      for i in range(anns.shape[0]):
          sum += max(IOU(anns[i], centroids))
  
      return sum / n
  
imports: import random
  import numpy
  from imageai.Detection.Custom.voc import parse_voc_annotation
label_desc: Use image node_id 2 for calling a global function with example usage: avg_IOU(anns, centroids) and returns: unknown