code: def create_list(devkit_dir, years, output_dir):
      """
      create following list:
          1. trainval.txt
          2. test.txt
      """
      trainval_list = []
      test_list = []
      for year in years:
          trainval, test = _walk_voc_dir(devkit_dir, year, output_dir)
          trainval_list.extend(trainval)
          test_list.extend(test)
  
      random.shuffle(trainval_list)
      with open(osp.join(output_dir, "trainval.txt"), "w") as ftrainval:
          for item in trainval_list:
              ftrainval.write(item[0] + " " + item[1] + "\n")
  
      with open(osp.join(output_dir, "test.txt"), "w") as fval:
          ct = 0
          for item in test_list:
              ct += 1
              fval.write(item[0] + " " + item[1] + "\n")
  
file_path: PaddleDetection/ppdet/utils/voc_utils.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  import os.path
  import re
  import random
label_desc: Use image node_id 1 for calling a global function with example usage: create_list(devkit_dir, years, output_dir) without return types