def predict(
        self,
        include_annotated_records: bool = False,
        include_abstentions: bool = False,
        prediction_agent: str = "MajorityVoter",
        tie_break_policy: Union[TieBreakPolicy, str] = "abstain",
    ) -> DatasetForTextClassification:
        """Applies the label model.

        Args:
            include_annotated_records: Whether to include annotated records.
            include_abstentions: Whether to include records in the output, for which the label model abstained.
            prediction_agent: String used for the ``prediction_agent`` in the returned records.
            tie_break_policy: Policy to break ties (IGNORED FOR MULTI-LABEL!). You can choose among two policies:

                - `abstain`: Do not provide any prediction
                - `random`: randomly choose among tied option using deterministic hash

                The last policy can introduce quite a bit of noise, especially when the tie is among many labels,
                as is the case when all the labeling functions (rules) abstained.

        Returns:
            A dataset of records that include the predictions of the label model.
        """
        wl_matrix = self._weak_labels.matrix(has_annotation=None if include_annotated_records else False)
        records = self._weak_labels.records(has_annotation=None if include_annotated_records else False)

        assert records, ValueError(
            "No records are being passed. Use `include_annotated_records` to include"
            " also include annotated records or us `rg.log` to add records."
        )

        if isinstance(self._weak_labels, WeakMultiLabels):
            records = self._make_multi_label_records(
                probabilities=self._compute_multi_label_probs(wl_matrix),
                records=records,
                include_abstentions=include_abstentions,
                prediction_agent=prediction_agent,
            )
        else:
            if isinstance(tie_break_policy, str):
                tie_break_policy = TieBreakPolicy(tie_break_policy)

            records = self._make_single_label_records(
                probabilities=self._compute_single_label_probs(wl_matrix),
                records=records,
                include_abstentions=include_abstentions,
                prediction_agent=prediction_agent,
                tie_break_policy=tie_break_policy,
            )

        return DatasetForTextClassification(records)
Applies the label model.

        Args:
            include_annotated_records: Whether to include annotated records.
            include_abstentions: Whether to include records in the output, for which the label model abstained.
            prediction_agent: String used for the ``prediction_agent`` in the returned records.
            tie_break_policy: Policy to break ties (IGNORED FOR MULTI-LABEL!). You can choose among two policies:

                - `abstain`: Do not provide any prediction
                - `random`: randomly choose among tied option using deterministic hash

                The last policy can introduce quite a bit of noise, especially when the tie is among many labels,
                as is the case when all the labeling functions (rules) abstained.

        Returns:
            A dataset of records that include the predictions of the label model.
        
argilla-v1/src/argilla_v1/labeling/text_classification/label_models.py