class_docstr: PipelineProfiler to trace one pipeline.
class_docstr_tok: ["PipelineProfiler","to","trace","one","pipeline","."]
code: def cal_time(list_in, list_out):
      if len(list_in) == 0:  # concat/func is no init
          return 0
      num = min(len(list_in), len(list_out))
      total_time = sum(list_out[0:num]) - sum(list_in[0:num])
      return round(total_time, 4)
  
imports: import json
  from typing import Dict, List
  from tabulate import tabulate
  from copy import deepcopy
  from pathlib import Path
  from towhee.runtime.constants import WindowAllConst
  from towhee.runtime.time_profiler import Event
  from towhee.utils.log import engine_log
label_desc: Use image node_id 8 for calling the PipelineProfiler obj's underlying member method code with example usage: obj.cal_time(list_in, list_out) and returns: round, int