code: def test_eval_detection_voc(self):
      pred_bboxes = self.result["bboxes"]
      pred_labels = self.result["labels"]
      pred_scores = self.result["scores"]
  
      gt_bboxes = self.dataset["bboxes"]
      gt_labels = self.dataset["labels"]
      gt_difficults = self.dataset["difficults"]
  
      result = eval_detection_voc(
          pred_bboxes,
          pred_labels,
          pred_scores,
          gt_bboxes,
          gt_labels,
          gt_difficults,
          use_07_metric=True,
      )
  
      # these scores were calculated by MATLAB code
      expected = [
          0.772727,
          0.738780,
          0.957576,
          0.640153,
          0.579473,
          1.000000,
          0.970030,
          1.000000,
          0.705931,
          0.678719,
          0.863636,
          1.000000,
          1.000000,
          0.561364,
          0.798813,
          0.712121,
          0.939394,
          0.563636,
          0.927273,
          0.654545,
      ]
  
      np.testing.assert_almost_equal(result["ap"], expected, decimal=5)
      np.testing.assert_almost_equal(
          result["map"], np.nanmean(expected), decimal=5
      )
  
imports: from __future__ import division
  import numpy
  import os
  from six.moves.urllib import request
  import unittest
  from chainer import testing
  from chainercv.evaluations import calc_detection_voc_ap
  from chainercv.evaluations import calc_detection_voc_prec_rec
  from chainercv.evaluations import eval_detection_voc
label_desc: Use image node_id 2 for calling the TestEvalDetectionVOCAP obj's underlying member method code with example usage: obj.test_eval_detection_voc() without return types