def process(self, data_batch, data_samples: Sequence[dict]) -> None:
        """Process one batch of data samples.

        The processed results should be stored in ``self.results``, which will
        be used to computed the metrics when all batches have been processed.

        Args:
            data_batch: A batch of data from the dataloader.
            data_samples (Sequence[dict]): A batch of outputs from the model.
        """
        for data_sample in data_samples:
            result = dict()
            if 'pred_score' in data_sample:
                result['pred_score'] = data_sample['pred_score'].cpu()
            else:
                result['pred_label'] = data_sample['pred_label'].cpu()
            result['gt_label'] = data_sample['gt_label'].cpu()
            result['gt_category'] = data_sample['img_path'].split('/')[-2]
            result['img_name'] = data_sample['img_path'].split('/')[-1]

            aggregated_category_probabilities = []
            # get the prediction for each category of current instance
            for category in self.categories:
                category_indices = getattr(self, f'{category}_indices')
                category_probabilities = torch.gather(
                    result['pred_score'], 0,
                    torch.tensor(category_indices)).mean()
                aggregated_category_probabilities.append(
                    category_probabilities)
            # sort the probabilities in descending order
            pred_indices = torch.stack(aggregated_category_probabilities
                                       ).argsort(descending=True).numpy()
            result['pred_category'] = np.take(self.categories, pred_indices)

            # Save the result to `self.results`.
            self.results.append(result)
Process one batch of data samples.

        The processed results should be stored in ``self.results``, which will
        be used to computed the metrics when all batches have been processed.

        Args:
            data_batch: A batch of data from the dataloader.
            data_samples (Sequence[dict]): A batch of outputs from the model.
        
mmpretrain/evaluation/metrics/shape_bias_label.py