How draw track in deepstream via python api?

How i can draw track (box path) in deepstream 5.1 on osd via python api?

Hi. I find solution:!

tracks = {}

def osd_sink_pad_buffer_probe(pad, info, u_data):
    gst_buffer = info.get_buffer()
    batch_meta = pyds.gst_buffer_get_nvds_batch_meta(hash(gst_buffer))
    l_frame = batch_meta.frame_meta_list

    while l_frame:
        try:
            frame_meta = pyds.NvDsFrameMeta.cast(l_frame.data)
        except StopIteration:
            break

        frame_number = frame_meta.frame_num
        l_obj = frame_meta.obj_meta_list

        while l_obj:
            try:
                obj_meta=pyds.NvDsObjectMeta.cast(l_obj.data)
            except StopIteration:
                continue

            object_id = str(obj_meta.object_id)
            if obj_meta.tracker_bbox_info.org_bbox_coords.left > 0 and obj_meta.tracker_bbox_info.org_bbox_coords.top > 0:
                if object_id in tracks:
                    tracks[object_id].append({
                        'x': int(obj_meta.tracker_bbox_info.org_bbox_coords.left),
                        'y': int(obj_meta.tracker_bbox_info.org_bbox_coords.top)})
                else:
                    colors[object_id] = [random.uniform(0, 1) for _ in range(3)]
                    tracks[object_id] = collections.deque(maxlen=200)
                    tracks[object_id].append({
                        'x': int(obj_meta.tracker_bbox_info.org_bbox_coords.left),
                        'y': int(obj_meta.tracker_bbox_info.org_bbox_coords.top)})

            display_meta = pyds.nvds_acquire_display_meta_from_pool(batch_meta)

            if object_id in tracks:
                for i in range(len(tracks[object_id]) - 1):
                    if i % 16 == 0:
                        pyds.nvds_add_display_meta_to_frame(frame_meta, display_meta)
                        display_meta = pyds.nvds_acquire_display_meta_from_pool(batch_meta)
                    display_meta.num_lines = 1 + (i % 16)
                    py_nvosd_line_params = display_meta.line_params[i % 16]
                    py_nvosd_line_params.line_color.set(*colors[object_id], 0.9)
                    py_nvosd_line_params.line_width = i // 15 + 2
                    py_nvosd_line_params.x1 = tracks[object_id][i]['x']
                    py_nvosd_line_params.x2 = tracks[object_id][i + 1]['x']
                    py_nvosd_line_params.y1 = tracks[object_id][i]['y']
                    py_nvosd_line_params.y2 = tracks[object_id][i + 1]['y']

            l_user_meta = obj_meta.obj_user_meta_list            
            try:
                l_obj = l_obj.next
            except StopIteration:
                break

        return Gst.PadProbeReturn.OK

Glad to know issue resolved.