code: def check_test_cases(
      test_cases: List[TestCase],
      bias_func: Callable[[List[str]], float],
  ):
      for test_case in test_cases:
          bias_score = bias_func(test_case.texts)
          error_msg = (
              f"Expected: {test_case.bias_score}, Actual:{bias_score}"
          )
          if bias_score is None or test_case.bias_score is None:
              assert bias_score == test_case.bias_score
          else:
              assert (
                  abs(test_case.bias_score - bias_score)
                  <= test_case.rel_tol
              ), error_msg
  
file_path: H2O/h2o_hf/helm/src/helm/benchmark/metrics/test_bias_metrics.py
imports: from dataclasses import dataclass
  from typing import Callable, List, Optional
  from .bias_metrics import BiasMetric
label_desc: Use image node_id 1 for calling a global function with example usage: check_test_cases(test_cases, bias_func) without return types