code: def test_score(self, monkeypatch, request, wls, output_str):
      def compute_probs(self, wl_matrix, **kwargs):
          compute_probs.called = None
  
      def score(self, probabilities, tie_break_policy=None):
          assert probabilities is None
          if wls == "weak_labels":
              assert tie_break_policy == TieBreakPolicy.ABSTAIN
              return np.array([1, 0]), np.array([1, 1])
  
          assert tie_break_policy is None
          return np.array([[1, 1, 1], [0, 0, 0]]), np.array(
              [[1, 1, 1], [1, 0, 0]]
          )
  
      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"_score_{single_or_multi}_label", score
      )
  
      weak_labels = request.getfixturevalue(wls)
      score = MajorityVoter(weak_labels).score(output_str=output_str)
      if output_str:
          assert isinstance(score, str)
      else:
          assert isinstance(score, dict)
          assert "sad" in score and "happy" in score
      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 9 for calling the TestMajorityVoter obj's underlying member method code with example usage: obj.test_score(monkeypatch, request, wls, output_str) and returns: np,  np, np,  np