code: def nms_fallback(boxes, thresh):
      """
      Perform non-maximal suppression and return the indices
      Parameters
      ----------
      boxes: [[x, y, xmax, ymax, score]]
  
      Returns kept box indices
      -------
  
      """
      order = np.argsort(boxes[:, -1])[::-1]
  
      iou_mat = bbox_iou(boxes[:, :4], boxes[:, :4])
  
      keep = []
  
      while len(order) > 0:
          i = order[0]
          keep.append(i)
  
          IOU = iou_mat[i, order[1:]]
  
          remaining = np.where(IOU <= thresh)[0]
          order = order[remaining + 1]
  
      return keep
  
imports: from __future__ import absolute_import
  import logging
  import time
  import numpy
  import mxnet
  from gluoncv.utils.bbox import bbox_iou
  from gluoncv.data import COCODetection
  from .utils import timeit, Track
  from .motion_estimation import FarneBeckFlowMotionEstimator
  from .motion_estimation import DummyMotionEstimator
label_desc: Use image node_id 1 for calling a global function with example usage: nms_fallback(boxes, thresh) and returns: keep