class_docstr: Computes the weak labels of a multi-label text classification dataset by applying a given list of rules.
  
  Args:
      dataset: Name of the dataset to which the rules will be applied.
      rules: A list of rules (labeling functions). They must return a string, list of strings, or ``None`` in case of
          abstention. If None, we will use the rules of the dataset (Default).
      ids: An optional list of record ids to filter the dataset before applying the rules.
      query: An optional ElasticSearch query with the
          `query string syntax <https://docs.argilla.io/en/latest/practical_guides/filter_dataset.html>`_
          to filter the dataset before applying the rules.
  
  Raises:
      NoRulesFoundError: When you do not provide rules, and the dataset has no rules either.
      DuplicatedRuleNameError: When you provided multiple rules with the same name.
      NoRecordsFoundError: When the filtered dataset is empty.
  
  Examples:
      >>> # Get the 3 dimensional weak label matrix from a multi-label classification dataset with rules:
      >>> weak_labels = WeakMultiLabels(dataset="my_dataset")
      >>> weak_labels.matrix()
      >>> weak_labels.summary()
      >>>
      >>> # Get the 3 dimensional weak label matrix from rules defined in Python:
      >>> def awesome_rule(record: TextClassificationRecord) -> str:
      ...     return ["Positive", "Slang"] if "next level" in record.text else None
      >>> another_rule = Rule(query="amped OR psyched", label=["Positive", "Slang"])
      >>> weak_labels = WeakMultiLabels(dataset="my_dataset", rules=[awesome_rule, another_rule])
      >>> weak_labels.matrix()
      >>> weak_labels.summary()
class_docstr_tok: ["Computes","the","weak","labels","of","a","multi-label","text","classification","dataset","by","applying","a","given","list","of","rules",".","Args",":","dataset",":","Name","of","the","dataset","to","which","the","rules","will","be","applied",".","rules",":","A","list","of","rules","(","labeling","functions",")",".","They","must","return","a","string",",","list","of","strings",",","or","``","None","``","in","case","of","abstention",".","If","None",",","we","will","use","the","rules","of","the","dataset","(","Default",")",".","ids",":","An","optional","list","of","record","ids","to","filter","the","dataset","before","applying","the","rules",".","query",":","An","optional","ElasticSearch","query","with","the","`","query","string","syntax","<","https",":","\/\/docs.argilla.io\/en\/latest\/practical_guides\/filter_dataset.html",">","`","_","to","filter","the","dataset","before","applying","the","rules",".","Raises",":","NoRulesFoundError",":","When","you","do","not","provide","rules",",","and","the","dataset","has","no","rules","either",".","DuplicatedRuleNameError",":","When","you","provided","multiple","rules","with","the","same","name",".","NoRecordsFoundError",":","When","the","filtered","dataset","is","empty",".","Examples",":",">",">",">","#","Get","the","3","dimensional","weak","label","matrix","from","a","multi-label","classification","dataset","with","rules",":",">",">",">","weak_labels","=","WeakMultiLabels","(","dataset=","''","my_dataset","''",")",">",">",">","weak_labels.matrix","(",")",">",">",">","weak_labels.summary","(",")",">",">",">",">",">",">","#","Get","the","3","dimensional","weak","label","matrix","from","rules","defined","in","Python",":",">",">",">","def","awesome_rule","(","record",":","TextClassificationRecord",")","-",">","str",":","...","return","[","``","Positive","''",",","``","Slang","''","]","if","``","next","level","''","in","record.text","else","None",">",">",">","another_rule","=","Rule","(","query=","''","amped","OR","psyched","''",",","label=","[","``","Positive","''",",","``","Slang","''","]",")",">",">",">","weak_labels","=","WeakMultiLabels","(","dataset=","''","my_dataset","''",",","rules=","[","awesome_rule",",","another_rule","]",")",">",">",">","weak_labels.matrix","(",")",">",">",">","weak_labels.summary","(",")"]
docstr: Returns the annotation labels as a matrix of integers.
  
  It has the dimensions ("nr of record" x "nr of labels").
  It holds a 1 or 0 to indicate if the record is annotated with the corresponding label.
  In case there is no annotation for the record, it holds a -1 for each label.
  
  Args:
      include_missing: If True, returns a matrix of the length of the record list (``self.records()``).
          For this, we will fill the matrix with -1 for records without an annotation.
  
  Returns:
      The annotation labels as a matrix of integers.
docstr_tok: ["Returns","the","annotation","labels","as","a","matrix","of","integers",".","It","has","the","dimensions","(","``","nr","of","record","''","x","``","nr","of","labels","''",")",".","It","holds","a","1","or","0","to","indicate","if","the","record","is","annotated","with","the","corresponding","label",".","In","case","there","is","no","annotation","for","the","record",",","it","holds","a","-1","for","each","label",".","Args",":","include_missing",":","If","True",",","returns","a","matrix","of","the","length","of","the","record","list","(","``","self.records","(",")","``",")",".","For","this",",","we","will","fill","the","matrix","with","-1","for","records","without","an","annotation",".","Returns",":","The","annotation","labels","as","a","matrix","of","integers","."]
code: def annotation(
      self,
      include_missing: bool = False,
  ) -> np.ndarray:
      """Returns the annotation labels as a matrix of integers.
  
      It has the dimensions ("nr of record" x "nr of labels").
      It holds a 1 or 0 to indicate if the record is annotated with the corresponding label.
      In case there is no annotation for the record, it holds a -1 for each label.
  
      Args:
          include_missing: If True, returns a matrix of the length of the record list (``self.records()``).
              For this, we will fill the matrix with -1 for records without an annotation.
  
      Returns:
          The annotation labels as a matrix of integers.
      """
      if include_missing:
          return self._annotation
  
      return self._annotation[self._annotation.sum(1) >= 0]
  
imports: import warnings
  from collections import Counter
  from typing import Callable, Dict, List, Optional, Tuple, Union
  import numpy
  import pandas
  from tqdm.auto import tqdm
  from argilla import load
  from argilla.client.datasets import DatasetForTextClassification
  from argilla.client.models import TextClassificationRecord
  from argilla.labeling.text_classification.rule import Rule, load_rules
label_desc: Use image node_id 6 for calling the WeakMultiLabels obj's underlying member method code with example usage: obj.annotation(include_missing) and returns: self, self