code: def change_and_create_cfg_file(
      classes_info, save_cfg_path="./cfg/my_yolov3.cfg"
  ):
      # create my_yolov3.cfg file changed predictor filters and yolo classes param.
      # this operation only deal with yolov3-spp.cfg
      filters_lines = [636, 722, 809]
      classes_lines = [643, 729, 816]
      cfg_lines = open(cfg_path, "r").readlines()
  
      for i in filters_lines:
          assert (
              "filters" in cfg_lines[i - 1]
          ), "filters param is not in line:{}".format(i - 1)
          output_num = (5 + len(classes_info)) * 3
          cfg_lines[i - 1] = "filters={}\n".format(output_num)
  
      for i in classes_lines:
          assert (
              "classes" in cfg_lines[i - 1]
          ), "classes param is not in line:{}".format(i - 1)
          cfg_lines[i - 1] = "classes={}\n".format(len(classes_info))
  
      with open(save_cfg_path, "w") as w:
          w.writelines(cfg_lines)
  
imports: import os
label_desc: Use image node_id 3 for calling a global function with example usage: change_and_create_cfg_file(classes_info, save_cfg_path) without return types