code: def test_predict(
      self,
      monkeypatch,
      request,
      wls,
      include_annotated_records,
      expected,
  ):
      def compute_probs(self, wl_matrix, **kwargs):
          assert len(wl_matrix) == expected
          compute_probs.called = None
  
      def make_records(self, probabilities, records, **kwargs):
          assert probabilities is None
          return records
  
      single_or_multi = (
          "multi" if wls == "weak_multi_labels" else "single"
      )
      monkeypatch.setattr(
          MajorityVoter,
          f"_compute_{single_or_multi}_label_probs",
          compute_probs,
      )
      monkeypatch.setattr(
          MajorityVoter,
          f"_make_{single_or_multi}_label_records",
          make_records,
      )
  
      weak_labels = request.getfixturevalue(wls)
      mj = MajorityVoter(weak_labels)
  
      assert (
          len(
              mj.predict(
                  include_annotated_records=include_annotated_records
              )
          )
          == expected
      )
      assert hasattr(compute_probs, "called")
  
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 2 for calling the TestMajorityVoter obj's underlying member method code with example usage: obj.test_predict(monkeypatch, request, wls, include_annotated_records, expected) and returns: records