code: def test_matrix_annotation(self, monkeypatch):
      expected_records = [
          TextClassificationRecord(
              text="test without annot", multi_label=True
          ),
          TextClassificationRecord(
              text="test with annot",
              annotation="positive",
              multi_label=True,
          ),
      ]
  
      def mock_load(*args, **kwargs):
          return expected_records
  
      monkeypatch.setattr(
          "argilla.labeling.text_classification.weak_labels.load",
          mock_load,
      )
  
      def mock_apply(self, *args, **kwargs):
          weak_label_matrix = np.array(
              [[[1, 0], [0, 1]], [[-1, -1], [1, 0]]], dtype=np.short
          )
          annotation_array = np.array(
              [[-1, -1], [1, 0]], dtype=np.short
          )
          labels = ["negative", "positive"]
          return weak_label_matrix, annotation_array, labels
  
      monkeypatch.setattr(WeakMultiLabels, "_apply_rules", mock_apply)
  
      weak_labels = WeakMultiLabels(
          rules=[lambda x: "mock"] * 2, dataset="mock"
      )
  
      assert (
          weak_labels.matrix(has_annotation=False)
          == np.array([[[1, 0], [0, 1]]], dtype=np.short)
      ).all()
      assert (
          weak_labels.matrix(has_annotation=True)
          == np.array([[[-1, -1], [1, 0]]], dtype=np.short)
      ).all()
      assert (
          weak_labels.annotation() == np.array([[1, 0]], dtype=np.short)
      ).all()
      assert (
          weak_labels.annotation(include_missing=True)
          == np.array([[[-1, -1], [1, 0]]], dtype=np.short)
      ).all()
  
imports: import sys
  from typing import Callable, List, Optional, Union
  import numpy
  import pandas
  import pytest
  from argilla.client.models import TextClassificationRecord
  from argilla.client.sdk.text_classification.models import CreationTextClassificationRecord, TextClassificationBulkData
  from argilla.labeling.text_classification import WeakLabels, WeakMultiLabels
  from argilla.labeling.text_classification.rule import Rule
  from argilla.labeling.text_classification.weak_labels import DuplicatedRuleNameError, MissingLabelError, MultiLabelError, NoRecordsFoundError, NoRulesFoundError, WeakLabelsBase
  from argilla.server.commons.models import TaskType
  from pandas.testing import assert_frame_equal
  from tests.integration.helpers import SecuredClient
label_desc: Use image node_id 2 for calling the TestWeakMultiLabels obj's underlying member method code with example usage: obj.test_matrix_annotation(monkeypatch) and returns: expected_records, weak_label_matrix,  annotation_array,  labels