code: def multilabel_rules(monkeypatch) -> List[Callable]:
      def first_rule(
          record: TextClassificationRecord,
      ) -> Optional[Union[str, List[str]]]:
          if "negative" in record.text:
              return []
  
      def rule2(
          record: TextClassificationRecord,
      ) -> Optional[Union[str, List[str]]]:
          if "positive" in record.text:
              return ["negative", "positive"]
  
      rule2.__name__ = ""
  
      def mock_apply(self, *args, **kwargs):
          self._matching_ids = {1: None, 2: None}
  
      monkeypatch.setattr(Rule, "apply", mock_apply)
  
      argilla_rule = Rule(
          query="mock", label="positive", name="argilla_rule"
      )
  
      return [first_rule, rule2, argilla_rule]
  
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 4 for calling a global function with example usage: multilabel_rules(monkeypatch) and returns: list, list, list