code: def find_matches(self, priors, gt):
      assert self.use_prior_for_matching
      assert self.share_location
  
      matches = len(gt) * [None]
  
      for batch, gt_boxes in enumerate(gt):
          # check to see if there are any GT boxes for this image
          if len(gt_boxes) == 0:
              # if not then all the predictions are negative samples
              # may need to return all -1 for inds and 0 for overlap with same shape as locs?
              print("WARNING - found image with no ground truth box")
              continue
  
          # 1. Compute the overlap of each prior box with each ground truth box
          overlaps = util.calculate_bb_overlap(priors, gt_boxes[:, :4])
          # overlaps[overlaps <= 1.0e-6] = 0.0
  
          # 2. Use overlaps to compute the gt box each prior box is 'closest' to
          gt_assignment = overlaps.argmax(axis=1)  # max_inds
          match_overlaps = overlaps.max(axis=1)  # match_overlaps
  
          # 3. Set up the match_inds
          match_inds = np.empty((overlaps.shape[0],), dtype=np.int)
          match_inds.fill(-1)
  
          # 4. loop through each gt box, assigning the best match
          for inds in range(len(gt_boxes)):
              max_ind = np.argmax(overlaps)
              (ind_priorbox, ind_gt) = np.unravel_index(
                  max_ind, overlaps.shape
              )
  
              match_inds[ind_priorbox] = ind_gt
              match_overlaps[ind_priorbox] = overlaps[
                  ind_priorbox, ind_gt
              ]
  
              # remove that match
              overlaps[:, ind_gt] = -1.0
              overlaps[ind_priorbox, :] = -1.0
  
          # 5. any prior box above the overlap threshold with any gt box
          inds_ = np.where(
              (match_inds == -1)
              & (match_overlaps > self.overlap_threshold)
          )[0]
          match_inds[inds_] = gt_assignment[inds_]
  
          # match_inds maps from prior box ind to GT box
          matches[batch] = {
              "inds": match_inds,
              "overlap": match_overlaps,
          }
      return matches
  
imports: from neon import NervanaObject
  import numpy
  from util import util
  from neon.transforms import Softmax
label_desc: Use image node_id 14 for calling the MBoxLoss obj's underlying member method code with example usage: obj.find_matches(priors, gt) and returns: matches