code: def weak_labels(monkeypatch):
      def mock_load(*args, **kwargs):
          return [
              TextClassificationRecord(
                  text="test", annotation="negative"
              ),
              TextClassificationRecord(
                  text="test", annotation="positive"
              ),
              TextClassificationRecord(text="test"),
              TextClassificationRecord(
                  text="test", annotation="neutral"
              ),
          ]
  
      monkeypatch.setattr(
          "argilla.labeling.text_classification.weak_labels.load",
          mock_load,
      )
  
      def mock_apply(self, *args, **kwargs):
          weak_label_matrix = np.array(
              [[0, 1, -1], [2, 0, -1], [-1, -1, -1], [0, 2, 2]],
              dtype=np.short,
          )
          annotation_array = np.array([0, 1, -1, 2], dtype=np.short)
          label2int = {
              None: -1,
              "negative": 0,
              "positive": 1,
              "neutral": 2,
          }
          return weak_label_matrix, annotation_array, label2int
  
      monkeypatch.setattr(WeakLabels, "_apply_rules", mock_apply)
  
      return WeakLabels(rules=[lambda: None] * 3, dataset="mock")
  
imports: import sys
  import numpy
  import pytest
  from argilla.client.models import TextClassificationRecord
  from argilla.labeling.text_classification import FlyingSquid, Snorkel, WeakLabels, WeakMultiLabels
  from argilla.labeling.text_classification.label_models import LabelModel, MajorityVoter, MissingAnnotationError, NotFittedError, TieBreakPolicy, TooFewRulesError
label_desc: Use image node_id 1 for calling a global function with example usage: weak_labels(monkeypatch) and returns: WeakLabels, list, weak_label_matrix,  annotation_array,  label2int