code: def main():
      args = parse_args()
      p = Pool(args.num_workers)
  
      anno_list = get_file_paths(args.anno_path)
      overall_sample_class_stats = {}
      for anno in anno_list:
          sample_class_stats = p.apply_async(
              get_sample_class, args=(anno,)
          )
          overall_sample_class_stats.update(sample_class_stats.get())
      p.close()
      p.join()
  
      get_class_loss_weights(
          overall_sample_class_stats, temperature=args.temperature
      )
  
file_path: PaddleSeg/contrib/QualityInspector/tools/dataset/cal_class_weights.py
imports: import argparse
  import os
  import sys
  from collections import defaultdict
  from multiprocessing import Pool, cpu_count
  import cv2
  import numpy
  import prettytable
  import paddle
  import paddle.nn.functional
  from qinspector.utils.logger import setup_logger
label_desc: Use image node_id 5 for calling a global function with example usage: main() without return types