code: def get_voc(year, split):
      if year not in urls:
          raise ValueError
      key = year
  
      if split == "test" and year == "2007":
          key = "2007_test"
  
      # To support ChainerMN, the target directory should be locked.
      with filelock.FileLock(
          os.path.join(
              download.get_dataset_directory("pfnet/chainercv/.lock"),
              "voc.lock",
          )
      ):
          data_root = download.get_dataset_directory(root)
          base_path = os.path.join(
              data_root, "VOCdevkit/VOC{}".format(year)
          )
          split_file = os.path.join(
              base_path, "ImageSets/Main/{}.txt".format(split)
          )
          if os.path.exists(split_file):
              # skip downloading
              return base_path
  
          download_file_path = utils.cached_download(urls[key])
          ext = os.path.splitext(urls[key])[1]
          utils.extractall(download_file_path, data_root, ext)
      return base_path
  
imports: import filelock
  import numpy
  import os
  from chainer.dataset import download
  from chainercv import utils
label_desc: Use image node_id 1 for calling a global function with example usage: get_voc(year, split) and returns: base_path, base_path