code: def test_evaluate_instances_binary_generation():
      metric = ClassificationMetric(delimiter=None)
  
      request_states = [
          _request_state("yes", [_Option("yes", True)]),
          _request_state("yes", [_Option("yes", True)]),
          _request_state("yes", [_Option("yes", True)]),
          _request_state("yes", [_Option("no", True)]),
          _request_state("no", [_Option("yes", True)]),
          _request_state("no", [_Option("no", True)]),
          _request_state("invalid", [_Option("no", True)]),
      ]
  
      assert_stats_equal(
          metric.evaluate_instances(request_states),
          _expected_stats(
              {
                  "yes": {"tp": 3, "fp": 1, "tn": 2, "fn": 1},
                  "no": {"tp": 1, "fp": 1, "tn": 3, "fn": 2},
              }
          ),
      )
  
file_path: H2O/h2o_hf/helm/src/helm/benchmark/metrics/test_classification_metrics.py
imports: from collections import defaultdict
  from typing import Dict, List, NamedTuple
  from pytest import approx
  from helm.benchmark.adaptation.request_state import RequestState
  from helm.benchmark.metrics.classification_metrics import ClassificationMetric
  from helm.benchmark.metrics.statistic import Stat
  from helm.benchmark.scenarios.scenario import Input, Instance, Output, Reference, CORRECT_TAG
  from helm.common.request import Request, RequestResult, Sequence
label_desc: Use image node_id 4 for calling a global function with example usage: test_evaluate_instances_binary_generation() without return types