code: def register_pascal_voc():
      """
      Register PASCAL VOC 2007 and 2012 datasets to the data catalog.
      We first look up for these datasets paths in the dataset catalog,
      if the paths exist, we register, otherwise we remove the voc_data
      from the catalog registry.
      """
      voc_datasets = ["voc2007_folder", "voc2012_folder"]
      for voc_data in voc_datasets:
          data_info = VisslDatasetCatalog.get(voc_data)
          data_folder = data_info["train"][0]
          if g_pathmgr.exists(data_folder):
              train_data_info = get_voc_images_labels_info(
                  "train", data_folder
              )
              test_data_info = get_voc_images_labels_info(
                  "val", data_folder
              )
              data_info["train"] = train_data_info
              data_info["val"] = test_data_info
              VisslDatasetCatalog.remove(voc_data)
              VisslDatasetCatalog.register_data(voc_data, data_info)
          else:
              VisslDatasetCatalog.remove(voc_data)
  
imports: import json
  import logging
  import os
  from typing import List
  import numpy
  from iopath.common.file_io import g_pathmgr
  from vissl.data.datasets import get_coco_imgs_labels_info, get_voc_images_labels_info
  from vissl.utils.misc import get_json_data_catalog_file
  from vissl.utils.slurm import get_slurm_dir
label_desc: Use image node_id 4 for calling a global function with example usage: register_pascal_voc() without return types