code: def _get_yolo_detections(
      l, im_shape, net_shape, thresh, relative, dets
  ):
      data = l["output"]
      active_data_loc = np.asarray(np.where(data[:, 4, :, :] > thresh))
      before_correct_dets = []
      for i in range(active_data_loc.shape[1]):
          location = [
              active_data_loc[0][i],
              active_data_loc[1][i],
              active_data_loc[2][i],
          ]
          box_b = _get_box(
              data,
              l["biases"],
              np.asarray(l["mask"])[location[0]],
              location,
              data.shape[3],
              data.shape[2],
              net_shape[0],
              net_shape[1],
          )
          objectness = data[location[0]][4][location[1]][location[2]]
          classes = l["classes"]
          prob = (
              objectness
              * data[
                  location[0],
                  5 : 5 + 1 + classes,
                  location[1],
                  location[2],
              ]
          )
          prob[prob < thresh] = 0
          detection = {}
          detection["bbox"] = box_b
          detection["classes"] = classes
          detection["prob"] = prob
          detection["objectness"] = objectness
          before_correct_dets.append(detection)
      dets.extend(
          _correct_boxes(
              before_correct_dets,
              im_shape[0],
              im_shape[1],
              net_shape[0],
              net_shape[1],
              relative,
          )
      )
  
imports: from __future__ import division
  import math
  from collections import namedtuple
  from functools import cmp_to_key
  import numpy
label_desc: Use image node_id 8 for calling a global function with example usage: _get_yolo_detections(l, im_shape, net_shape, thresh, relative, dets) without return types