def _compute_single_label_probs(self, wl_matrix: np.ndarray) -> np.ndarray:
        """Helper methods that computes the probabilities.

        Args:
            wl_matrix: The weak label matrix.

        Returns:
            A matrix of "probabilities" with nr or records x nr of labels.
            The label order matches the one from `self.weak_labels.labels`.
        """
        counts = np.column_stack(
            [
                np.count_nonzero(wl_matrix == self._weak_labels.label2int[label], axis=1)
                for label in self._weak_labels.labels
            ]
        )
        with np.errstate(invalid="ignore"):
            probabilities = counts / counts.sum(axis=1).reshape(len(counts), -1)

        # we treat abstentions as ties among all labels (see snorkel)
        probabilities[np.isnan(probabilities)] = 1.0 / len(self._weak_labels.labels)

        return probabilities
Helper methods that computes the probabilities.

        Args:
            wl_matrix: The weak label matrix.

        Returns:
            A matrix of "probabilities" with nr or records x nr of labels.
            The label order matches the one from `self.weak_labels.labels`.
        
argilla-v1/src/argilla_v1/labeling/text_classification/label_models.py