code: def main(args):
      # setup the config file
      cfg = get_cfg()
      cfg.merge_from_file(args.config_file)
      cfg.merge_from_list(args.opts)
      cfg.freeze()
      default_setup(cfg, args)
  
      if args.eval_only:
          model = Trainer.build_model(cfg)
          DetectionCheckpointer(
              model, save_dir=cfg.OUTPUT_DIR
          ).resume_or_load(cfg.MODEL.WEIGHTS, resume=args.resume)
          res = Trainer.test(cfg, model)
          return res
  
      trainer = Trainer(cfg)
      trainer.resume_or_load(resume=args.resume)
      return trainer.train()
  
file_path: vissl/tools/object_detection_benchmark.py
imports: import os
  from detectron2.checkpoint import DetectionCheckpointer
  from detectron2.config import get_cfg
  from detectron2.engine import default_argument_parser, default_setup, DefaultTrainer, launch
  from detectron2.evaluation import COCOEvaluator, PascalVOCDetectionEvaluator
  from detectron2.layers import get_norm
  from detectron2.modeling.roi_heads import Res5ROIHeads, ROI_HEADS_REGISTRY
label_desc: Use image node_id 1 for calling a global function with example usage: main(args) and returns: trainer, res