code: def test_nms_mkl(backend_pair_mkl, fargs):
      thre, box_count, normalized, num_zero_boxes = fargs
      x1, y1, x2, y2, score = 0, 1, 2, 3, 4
  
      dets = np.zeros((box_count, 5), dtype=np.float32)
      dets[:, x1] = np.random.random((box_count,)) * 10
      dets[:, x2] = dets[:, x1] + (
          np.random.random((box_count,)) * 10 + 400
      )
      dets[:, y1] = np.random.random((box_count,)) * 10
      dets[:, y2] = dets[:, y1] + (
          np.random.random((box_count,)) * 10 + 600
      )
  
      dets[:, score] = np.sort(np.random.random((box_count,)))[::-1]
  
      dets = np.vstack([dets, np.zeros((num_zero_boxes, 5))])
      nm, nc = backend_pair_mkl
  
      # call reference nms
      keep_ref = py_cpu_nms(dets, thre, normalized)
  
      # call cpu nms
      dets_nc = nc.array(dets)
  
      tic_cpu = nc.init_mark()
      toc_cpu = nc.init_mark()
      nc.record_mark(tic_cpu)
  
      keep_nc = nc.nms(dets_nc, thre)
  
      nc.record_mark(toc_cpu)
      nc.synchronize_mark(toc_cpu)
      print(
          "cpu NMS time (ms): {}".format(nc.get_time(tic_cpu, toc_cpu))
      )
  
      assert keep_nc == keep_ref
  
      # call mkl nms
      dets_nm = nm.array(dets)
  
      tic_mkl = nm.init_mark()
      toc_mkl = nm.init_mark()
      nm.record_mark(tic_mkl)
  
      keep_nm = nm.nms(dets_nm, thre)
  
      nm.record_mark(toc_mkl)
      nm.synchronize_mark(toc_mkl)
      print(
          "mkl NMS time (ms): {}".format(nm.get_time(tic_mkl, toc_mkl))
      )
  
      assert keep_nm == keep_ref
  
file_path: neon/tests/test_nms.py
imports: from __future__ import division
  from __future__ import print_function
  from past.utils import old_div
  import itertools
  import numpy
  import pytest
label_desc: Use image node_id 3 for calling a global function with example usage: test_nms_mkl(backend_pair_mkl, fargs) without return types