code: def test_ok(metric_pairs, compute):
      m1, m2 = metric_pairs
  
      a = da.random.uniform(size=(100,), chunks=(25,))
      b = da.random.uniform(size=(100,), chunks=(25,))
  
      result = m1(a, b, compute=compute)
      if compute:
          assert isinstance(result, numbers.Real)
      else:
          assert isinstance(result, da.Array)
      expected = m2(a, b)
      assert abs(result - expected) < 1e-5
  
file_path: dask-ml/tests/metrics/test_regression.py
imports: import numbers
  import dask.array
  import numpy
  import pytest
  import sklearn.metrics
  from dask.array.utils import assert_eq
  import dask_ml.metrics
label_desc: Use image node_id 2 for calling a global function with example usage: test_ok(metric_pairs, compute) without return types