code: def test_multiout_binary_clf(metric, sk_metric):
      y_true = []
      y_pred = []
      for _ in range(30):
          y_true.append({i: random.random() < 0.3 for i in range(3)})
          y_pred.append({i: random.random() < 0.3 for i in range(3)})
      y_true = pd.DataFrame(y_true)
      y_pred = pd.DataFrame(y_pred)
  
      for i, (yt, yp) in enumerate(
          zip(
              y_true.to_dict(orient="records"),
              y_pred.to_dict(orient="records"),
          )
      ):
          metric.update(yt, yp)
          if i == 0:
              continue
  
          A = metric.get()
          B = sk_metric(y_true[: i + 1], y_pred[: i + 1])
          assert math.isclose(A, B, abs_tol=1e-3)
  
file_path: river/river/metrics/multioutput/test_multioutput_metrics.py
imports: from __future__ import annotations
  import collections
  import functools
  import math
  import random
  import pandas
  import pytest
  from sklearn import metrics
  from river import metrics
label_desc: Use image node_id 1 for calling a global function with example usage: test_multiout_binary_clf(metric, sk_metric) without return types