def setUp(self):
        """Setup some variables which are used in every test method.

        TestCase calls functions in this order: setUp() -> testMethod() ->
        tearDown() -> cleanUp()
        """
        self.tmp_dir = tempfile.TemporaryDirectory()

        self.ann_file_coco = \
            'tests/data/coco/test_keypoint_partition_metric.json'
        meta_info_coco = dict(
            from_file='configs/_base_/datasets/coco_wholebody.py')
        self.dataset_meta_coco = parse_pose_metainfo(meta_info_coco)
        self.coco = COCO(self.ann_file_coco)
        self.dataset_meta_coco['CLASSES'] = self.coco.loadCats(
            self.coco.getCatIds())

        self.topdown_data_coco = self._convert_ann_to_topdown_batch_data(
            self.ann_file_coco)
        assert len(self.topdown_data_coco) == 14
        self.bottomup_data_coco = self._convert_ann_to_bottomup_batch_data(
            self.ann_file_coco)
        assert len(self.bottomup_data_coco) == 4
        """
        The target results were obtained from CocoWholebodyMetric with
        score_mode='bbox' and nms_mode='none'. We cannot compare other
        combinations of score_mode and nms_mode because CocoWholebodyMetric
        calculates scores and nms using all keypoints while
        KeypointPartitionMetric calculates scores and nms part by part.
        As long as this case is tested correct, the other cases should be
        correct.
        """
        self.target_bbox_none = {
            'body/coco/AP': 0.749,
            'body/coco/AR': 0.800,
            'foot/coco/AP': 0.840,
            'foot/coco/AR': 0.850,
            'face/coco/AP': 0.051,
            'face/coco/AR': 0.050,
            'left_hand/coco/AP': 0.283,
            'left_hand/coco/AR': 0.300,
            'right_hand/coco/AP': 0.383,
            'right_hand/coco/AR': 0.380,
            'all/coco/AP': 0.284,
            'all/coco/AR': 0.450,
        }
Setup some variables which are used in every test method.

        TestCase calls functions in this order: setUp() -> testMethod() ->
        tearDown() -> cleanUp()
        
mmpose/tests/test_evaluation/test_metrics/test_keypoint_partition_metric.py