code: def test_apply(
      self,
      log_multilabel_dataset,
      multilabel_rules,
  ):
      weak_labels = WeakMultiLabels(
          rules=multilabel_rules, dataset=log_multilabel_dataset
      )
  
      assert weak_labels.labels == ["negative", "positive"]
  
      # check that all `Rule.apply`s are called
      assert weak_labels._rules[-1]._matching_ids == {1: None, 2: None}
  
      assert (
          weak_labels.matrix()
          == np.array(
              [
                  [[0, 0], [-1, -1], [0, 1]],
                  [[0, 0], [1, 1], [0, 1]],
                  [[-1, -1], [-1, -1], [-1, -1]],
              ],
              dtype=np.short,
          )
      ).all()
  
      assert (
          weak_labels._annotation
          == np.array([[1, 0], [1, 1], [-1, -1]], 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 1 for calling the TestWeakMultiLabels obj's underlying member method code with example usage: obj.test_apply(log_multilabel_dataset, multilabel_rules) without return types