code: def write_mot_results(self, filename, results, data_type="mot"):
      if data_type in ["mot", "mcmot", "lab"]:
          save_format = (
              "{frame},{id},{x1},{y1},{w},{h},{score},-1,-1,-1\n"
          )
      elif data_type == "kitti":
          save_format = "{frame} {id} car 0 0 -10 {x1} {y1} {x2} {y2} -10 -10 -10 -1000 -1000 -1000 -10\n"
      else:
          raise ValueError(data_type)
  
      with open(filename, "w") as f:
          for frame_id, tlwhs, tscores, track_ids in results:
              if data_type == "kitti":
                  frame_id -= 1
              for tlwh, score, track_id in zip(
                  tlwhs, tscores, track_ids
              ):
                  if track_id < 0:
                      continue
                  x1, y1, w, h = tlwh
                  x2, y2 = x1 + w, y1 + h
                  line = save_format.format(
                      frame=frame_id,
                      id=track_id,
                      x1=x1,
                      y1=y1,
                      x2=x2,
                      y2=y2,
                      w=w,
                      h=h,
                      score=score,
                  )
                  f.write(line)
      logger.info("MOT results save in {}".format(filename))
  
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 7 for calling the StreamTracker obj's underlying member method code with example usage: obj.write_mot_results(filename, results, data_type) without return types