code: def save_results(
      self,
      data,
      frame_id,
      online_ids,
      online_tlwhs,
      online_scores,
      average_time,
      show_image,
      save_dir,
  ):
      if show_image or save_dir is not None:
          assert "ori_image" in data
          img0 = data["ori_image"].numpy()[0]
          online_im = mot_vis.plot_tracking(
              img0,
              online_tlwhs,
              online_ids,
              online_scores,
              frame_id=frame_id,
              fps=1.0 / average_time,
          )
      if show_image:
          cv2.imshow("online_im", online_im)
      if save_dir is not None:
          cv2.imwrite(
              os.path.join(save_dir, "{:05d}.jpg".format(frame_id)),
              online_im,
          )
  
imports: import os
  import cv2
  import glob
  import paddle
  import numpy
  import collections
  from ppdet.core.workspace import create
  from ppdet.utils.checkpoint import load_weight, load_pretrain_weight
  from ppdet.metrics import Metric, MOTMetric, KITTIMOTMetric
  import ppdet.utils.stats
  from ppdet.engine.callbacks import Callback, ComposeCallback
  from ppdet.utils.logger import setup_logger
  from .dataset import MOTVideoStream, MOTImageStream
  from .utils import Timer
  from .modeling.mot.utils import Detection, get_crops, scale_coords, clip_box
  from .modeling.mot import visualization
label_desc: Use image node_id 8 for calling the StreamTracker obj's underlying member method code with example usage: obj.save_results(data, frame_id, online_ids, online_tlwhs, online_scores, average_time, show_image, save_dir) without return types