class_docstr: A basic label model that computes the majority vote across all rules.
  
  For single-label classification, it will predict the label with the most votes.
  For multi-label classification, it will predict all labels that got at least one vote by the rules.
  
  Args:
      weak_labels: The weak labels object.
class_docstr_tok: ["A","basic","label","model","that","computes","the","majority","vote","across","all","rules",".","For","single-label","classification",",","it","will","predict","the","label","with","the","most","votes",".","For","multi-label","classification",",","it","will","predict","all","labels","that","got","at","least","one","vote","by","the","rules",".","Args",":","weak_labels",":","The","weak","labels","object","."]
docstr: 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.
docstr_tok: ["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","."]
code: 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)
  
imports: import hashlib
  import logging
  from enum import Enum
  from typing import Dict, List, Tuple, Union
  import numpy
  from argilla import DatasetForTextClassification, TextClassificationRecord
  from argilla.labeling.text_classification.weak_labels import WeakLabels, WeakMultiLabels
  from argilla.utils.dependency import requires_dependencies
label_desc: Use image node_id 3 for calling the MajorityVoter obj's underlying member method code with example usage: obj.predict(include_annotated_records, include_abstentions, prediction_agent, tie_break_policy) and returns: DatasetForTextClassification