code: def get_centroid(bboxes):
      """
      https://adipandas.github.io/multi-object-tracker/_modules/motrackers/utils/misc.html
      Calculate centroids for multiple bounding boxes.
  
      Args:
          bboxes (numpy.ndarray): Array of shape `(n, 4)` or of shape `(4,)` where
              each row contains `(xmin, ymin, width, height)`.
  
      Returns:
          numpy.ndarray: Centroid (x, y) coordinates of shape `(n, 2)` or `(2,)`.
  
      """
  
      one_bbox = False
      if len(bboxes.shape) == 1:
          one_bbox = True
          bboxes = bboxes[None, :]
  
      xmin = bboxes[:, 0]
      ymin = bboxes[:, 1]
      w, h = bboxes[:, 2], bboxes[:, 3]
  
      xc = xmin + 0.5 * w
      yc = ymin + 0.5 * h
  
      x = np.hstack([xc[:, None], yc[:, None]])
  
      if one_bbox:
          x = x.flatten()
      return x
  
label_desc: Use image node_id 1 for calling a global function with example usage: get_centroid(bboxes) and returns: x