code: def test_classwise_evaluate(self):
      # create dummy data
      fake_json_file = osp.join(self.tmp_dir.name, "fake_data.json")
      self._create_dummy_lvis_json(fake_json_file)
      dummy_pred = self._create_dummy_results()
  
      # test single lvis dataset evaluation
      lvis_metric = LVISMetric(
          ann_file=fake_json_file, metric="bbox", classwise=True
      )
      lvis_metric.dataset_meta = dict(
          classes=["aerosol_can", "air_conditioner"]
      )
      lvis_metric.process(
          {},
          [
              dict(
                  pred_instances=dummy_pred,
                  img_id=0,
                  ori_shape=(640, 640),
              )
          ],
      )
      eval_results = lvis_metric.evaluate(size=1)
      target = {
          "lvis/bbox_AP": 1.0,
          "lvis/bbox_AP50": 1.0,
          "lvis/bbox_AP75": 1.0,
          "lvis/bbox_APs": 1.0,
          "lvis/bbox_APm": 1.0,
          "lvis/bbox_APl": 1.0,
          "lvis/bbox_APr": -1.0,
          "lvis/bbox_APc": 1.0,
          "lvis/bbox_APf": 1.0,
          "lvis/aerosol_can_precision": 1.0,
          "lvis/air_conditioner_precision": 1.0,
      }
      self.assertDictEqual(eval_results, target)
  
imports: import os.path
  import tempfile
  import unittest
  import numpy
  import pycocotools.mask
  import torch
  from mmdet.evaluation.metrics import LVISMetric
  from mmengine.fileio import dump
label_desc: Use image node_id 7 for calling the TestLVISMetric obj's underlying member method code with example usage: obj.test_classwise_evaluate() without return types