code: def eval_frame(self, frame_id, trk_tlwhs, trk_ids, rtn_events=False):
      # results
      trk_tlwhs = np.copy(trk_tlwhs)
      trk_ids = np.copy(trk_ids)
  
      # gts
      gt_objs = self.gt_frame_dict.get(frame_id, [])
      gt_tlwhs, gt_ids = unzip_objs(gt_objs)[:2]
  
      # ignore boxes
      ignore_objs = self.gt_ignore_frame_dict.get(frame_id, [])
      ignore_tlwhs = unzip_objs(ignore_objs)[0]
  
      # remove ignored results
      keep = np.ones(len(trk_tlwhs), dtype=bool)
      iou_distance = mm.distances.iou_matrix(
          ignore_tlwhs, trk_tlwhs, max_iou=0.5
      )
      if len(iou_distance) > 0:
          match_is, match_js = mm.lap.linear_sum_assignment(
              iou_distance
          )
          match_is, match_js = map(
              lambda a: np.asarray(a, dtype=int), [match_is, match_js]
          )
          match_ious = iou_distance[match_is, match_js]
  
          match_js = np.asarray(match_js, dtype=int)
          match_js = match_js[np.logical_not(np.isnan(match_ious))]
          keep[match_js] = False
          trk_tlwhs = trk_tlwhs[keep]
          trk_ids = trk_ids[keep]
  
      # get distance matrix
      iou_distance = mm.distances.iou_matrix(
          gt_tlwhs, trk_tlwhs, max_iou=0.5
      )
  
      # acc
      self.acc.update(gt_ids, trk_ids, iou_distance)
  
      if (
          rtn_events
          and iou_distance.size > 0
          and hasattr(self.acc, "last_mot_events")
      ):
          events = (
              self.acc.last_mot_events
          )  # only supported by https://github.com/longcw/py-motmetrics
      else:
          events = None
      return events
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  import copy
  import sys
  import math
  from collections import defaultdict
  import numpy
  from ppdet.modeling.bbox_utils import bbox_iou_np_expand
  from .map_utils import ap_per_class
  from .metrics import Metric
  from .munkres import Munkres
  from ppdet.utils.logger import setup_logger
label_desc: Use image node_id 4 for calling the MOTEvaluator obj's underlying member method code with example usage: obj.eval_frame(frame_id, trk_tlwhs, trk_ids, rtn_events) and returns: events