code: def test_log_loss(labels, normalize, sample_weight, daskify):
      n = 100
      c = 25
      y_true = np.random.choice(labels, size=n)
      y_pred = np.random.uniform(size=(n, len(labels)))
      y_pred /= y_pred.sum(1, keepdims=True)
  
      if sample_weight:
          sample_weight = np.random.uniform(size=n)
          sample_weight /= sample_weight.sum()
          dsample_weight = da.from_array(sample_weight, chunks=c)
      else:
          sample_weight = None
          dsample_weight = None
  
      if daskify:
          dy_true = da.from_array(y_true, chunks=c)
          dy_pred = da.from_array(y_pred, chunks=c)
      else:
          dy_true = y_true
          dy_pred = y_pred
          (dsample_weight,) = dask.compute(dsample_weight)
  
      a = sklearn.metrics.log_loss(
          y_true,
          y_pred,
          normalize=normalize,
          sample_weight=sample_weight,
      )
      b = dask_ml.metrics.log_loss(
          dy_true,
          dy_pred,
          labels=labels,
          normalize=normalize,
          sample_weight=dsample_weight,
      )
  
      assert_eq(a, b)
  
file_path: dask-ml/tests/metrics/test_metrics.py
imports: import dask
  import dask.array
  import numpy
  import numpy.testing
  import pytest
  import sklearn
  import sklearn.linear_model
  import sklearn.metrics
  from dask.array.utils import assert_eq
  import dask_ml.metrics
  import dask_ml.wrappers
label_desc: Use image node_id 6 for calling a global function with example usage: test_log_loss(labels, normalize, sample_weight, daskify) without return types