code: def get_inference_dataset(index, is_parent=True):
      assert (
          is_parent or len(cfg.TEST.DATASETS) == 1
      ), "The child inference process can only work on a single dataset"
  
      dataset_name = cfg.TEST.DATASETS[index]
  
      if cfg.TEST.PRECOMPUTED_PROPOSALS:
          assert (
              is_parent or len(cfg.TEST.PROPOSAL_FILES) == 1
          ), "The child inference process can only work on a single proposal file"
          assert len(cfg.TEST.PROPOSAL_FILES) == len(
              cfg.TEST.DATASETS
          ), (
              "If proposals are used, one proposal file must be specified for "
              "each dataset"
          )
          proposal_file = cfg.TEST.PROPOSAL_FILES[index]
      else:
          proposal_file = None
  
      return dataset_name, proposal_file
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from __future__ import unicode_literals
  from collections import defaultdict
  import cv2
  import datetime
  import logging
  import numpy
  import os
  import yaml
  from caffe2.python import workspace
  from detectron.core.config import cfg
  from detectron.core.config import get_output_dir
  from detectron.core.rpn_generator import generate_rpn_on_dataset
  from detectron.core.rpn_generator import generate_rpn_on_range
  from detectron.core.test import im_detect_all
  from detectron.datasets import task_evaluation
  from detectron.datasets.json_dataset import JsonDataset
  from detectron.modeling import model_builder
  from detectron.utils.io import save_object
  from detectron.utils.timer import Timer
  import detectron.utils.c2
  import detectron.utils.env
  import detectron.utils.net
  import detectron.utils.subprocess
  import detectron.utils.vis
label_desc: Use image node_id 2 for calling a global function with example usage: get_inference_dataset(index, is_parent) and returns: dataset_name,  proposal_file