code: def eval_sample(self, sample: Any, *_):
      assert isinstance(sample, dict), "sample must be a dict"
      assert "input" in sample, "sample must have an 'input' key"
  
      prompt = sample["input"]
      result = self.completion_fn(
          prompt=prompt,
          temperature=0.0,
      )
      sampled = result.get_completions()[0]
      return evals.record.record_match(
          is_valid_json(sampled), expected=None, picked=sampled
      )
  
file_path: evals/evals/elsuite/basic/json_validator.py
imports: import json
  from typing import Any
  import evals
  import evals.metrics
  import evals.record
  from evals.api import CompletionFn
label_desc: Use image node_id 2 for calling the JsonValidator obj's underlying member method code with example usage: obj.eval_sample(sample) and returns: evals