def matrix(self, has_annotation: Optional[bool] = None) -> np.ndarray:
        """Returns the 3 dimensional weak label matrix, or optionally just a part of it.

        It has the dimensions ("nr of record" x "nr of rules" x "nr of labels").
        It holds a 1 or 0 in case a rule votes for a label or not. If the rule abstains, it holds a -1 for each label.

        Args:
            has_annotation: If True, return only the part of the matrix that has a corresponding annotation.
                If False, return only the part of the matrix that has NOT a corresponding annotation.
                By default, we return the whole weak label matrix.

        Returns:
            The 3 dimensional weak label matrix, or optionally just a part of it.
        """
        matrix = self._matrix if self._extended_matrix is None else self._extended_matrix

        if has_annotation is True:
            return matrix[self._annotation.sum(1) >= 0]
        if has_annotation is False:
            return matrix[self._annotation.sum(1) < 0]

        return matrix
Returns the 3 dimensional weak label matrix, or optionally just a part of it.

        It has the dimensions ("nr of record" x "nr of rules" x "nr of labels").
        It holds a 1 or 0 in case a rule votes for a label or not. If the rule abstains, it holds a -1 for each label.

        Args:
            has_annotation: If True, return only the part of the matrix that has a corresponding annotation.
                If False, return only the part of the matrix that has NOT a corresponding annotation.
                By default, we return the whole weak label matrix.

        Returns:
            The 3 dimensional weak label matrix, or optionally just a part of it.
        
argilla-v1/src/argilla_v1/labeling/text_classification/weak_labels.py