code: def register_pascal_voc(
      name, dirname, split, year, class_names=CLASS_NAMES
  ):
      DatasetCatalog.register(
          name, lambda: load_voc_instances(dirname, split, class_names)
      )
      MetadataCatalog.get(name).set(
          thing_classes=list(class_names),
          dirname=dirname,
          year=year,
          split=split,
      )
  
file_path: detectron2/detectron2/data/datasets/pascal_voc.py
imports: import numpy
  import os
  import xml.etree.ElementTree
  from typing import List, Tuple, Union
  from detectron2.data import DatasetCatalog, MetadataCatalog
  from detectron2.structures import BoxMode
  from detectron2.utils.file_io import PathManager
label_desc: Use image node_id 2 for calling a global function with example usage: register_pascal_voc(name, dirname, split, year, class_names) without return types