def compute(
        self, metric_names: Union[str, List[str]], show_progress: bool = True
    ) -> Dict[str, List[ModelMetricResult]]:
        """Computes the annotator metrics for the given question.

        Args:
            metric_names: name or list of names for the metrics to compute. i.e. `accuracy`

        Raises:
            ValueError: If the metric name is not supported for the given question.

        Returns:
            metrics: dict with the metrics computed for each annotator, where the
                key corresponds to the user id and the values are a list with the
                metric results.
        """
        metric_names = self._check_metrics(metric_names)
        metric_classes = self._get_metric_classes(metric_names)

        responses_and_suggestions_per_user = get_responses_and_suggestions_per_user(
            self._dataset,
            self._question_name,
            filter_by=self._filter_by,
            sort_by=self._sort_by,
            max_records=self._max_records,
        )
        metrics = defaultdict(list)
        for user_id, resp_and_suggest in responses_and_suggestions_per_user.items():
            responses = resp_and_suggest["responses"]
            suggestions = resp_and_suggest["suggestions"]
            as_responses, as_suggestions = self._prepare_responses_and_suggestions(responses, suggestions)
            for metric_name, metric_cls in metric_classes:
                metric = metric_cls(responses=as_responses, suggestions=as_suggestions)
                result = metric.compute()
                metrics[user_id].append(ModelMetricResult(metric_name=metric_name, result=result, count=len(responses)))

        return dict(metrics)
Computes the annotator metrics for the given question.

        Args:
            metric_names: name or list of names for the metrics to compute. i.e. `accuracy`

        Raises:
            ValueError: If the metric name is not supported for the given question.

        Returns:
            metrics: dict with the metrics computed for each annotator, where the
                key corresponds to the user id and the values are a list with the
                metric results.
        
argilla-v1/src/argilla_v1/client/feedback/metrics/annotator_metrics.py