code: def _generate_voc2012_txt(base_path):
      with open(os.path.join(base_path, "train.txt"), "r") as f:
          train_ids = f.read().split("\n")[:-1]
      with open(os.path.join(base_path, "val.txt"), "r") as f:
          val_ids = f.read().split("\n")[:-1]
      with open(os.path.join(base_path, "train_voc2012.txt"), "r") as f:
          train_voc2012_ids = f.read().split("\n")[:-1]
      all_ids = list(set(train_ids + val_ids))
      val_voc2012_ids = [
          i for i in all_ids if i not in train_voc2012_ids
      ]
  
      with open(os.path.join(base_path, "val_voc2012.txt"), "w") as f:
          f.write("\n".join(sorted(val_voc2012_ids)))
      with open(
          os.path.join(base_path, "trainval_voc2012.txt"), "w"
      ) as f:
          f.write("\n".join(sorted(all_ids)))
  
file_path: chainercv/chainercv/datasets/sbd/sbd_utils.py
imports: import filelock
  import os
  import six
  from chainer.dataset import download
  from chainercv.datasets.voc.voc_utils import voc_instance_segmentation_label_names
  from chainercv import utils
label_desc: Use image node_id 1 for calling a global function with example usage: _generate_voc2012_txt(base_path) without return types