code: def test_eval_sample(
      completion: str,
      ideal: list[str],
      expected_match: bool,
  ):
      eval = Match(
          completion_fns=[TestCompletionFn(completion)],
          samples_jsonl="",
          eval_registry_path=Path("."),
      )
  
      recorder = DummyRecorder(None)
      with recorder.as_default_recorder("x"), patch.object(
          recorder, "record_match", wraps=recorder.record_match
      ) as record_match:
          eval.eval_sample(dict(input="Hello", ideal=ideal), None)
          record_match.assert_called_once_with(
              expected_match,
              expected=[ideal],
              picked=completion,
              sampled=completion,
              options=[ideal],
          )
  
file_path: evals/evals/elsuite/basic/match_test.py
imports: from pathlib import Path
  from typing import Any, Type
  from mock import patch
  from pytest import mark, raises
  from evals.api import DummyCompletionFn
  from evals.elsuite.basic.match import Match
  from evals.record import DummyRecorder
  from evals.utils.test import TestCompletionFn
label_desc: Use image node_id 1 for calling a global function with example usage: test_eval_sample(completion, ideal, expected_match) without return types