def compute(self, metric_names: Union[str, List[str]]) -> List[AgreementMetricResult]:
        """Computes the agreement metrics for the given question.

        Args:
            metric_names: name or list of names for the metrics to compute. i.e. `alpha`.
            kwargs: additional arguments to pass to the metric.

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

        Returns:
            agreement_metrics: A list of `AgreementMetricResult` objects for the dataset.
        """
        metric_names = self._check_metrics(metric_names)
        metric_classes = self._get_metric_classes(metric_names)

        dataset = prepare_dataset_for_annotation_task(
            self._dataset,
            self._question_name,
            self._field_name,
            filter_by=self._filter_by,
            sort_by=self._sort_by,
            max_records=self._max_records,
        )

        distance_function = QUESTION_TO_DISTANCE[self._question_type]

        metrics = []
        for metric_name, metric_cls in metric_classes:
            metric = metric_cls(annotated_dataset=dataset, distance_function=distance_function)
            result = metric.compute()
            metrics.append(AgreementMetricResult(metric_name=metric_name, result=result, count=len(dataset)))

        if len(metric_names) == 1:
            return metrics[0]

        return metrics
Computes the agreement metrics for the given question.

        Args:
            metric_names: name or list of names for the metrics to compute. i.e. `alpha`.
            kwargs: additional arguments to pass to the metric.

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

        Returns:
            agreement_metrics: A list of `AgreementMetricResult` objects for the dataset.
        
argilla-v1/src/argilla_v1/client/feedback/metrics/agreement_metrics.py