code: def _log_loss_inner(
      x: ArrayLike,
      y: ArrayLike,
      sample_weight: Optional[ArrayLike],
      **kwargs,
  ):
      # da.map_blocks wasn't able to concatenate together the results
      # when we reduce down to a scalar per block. So we make an
      # array with 1 element.
      if sample_weight is not None:
          sample_weight = sample_weight.ravel()
      return np.array(
          [
              sklearn.metrics.log_loss(
                  x, y, sample_weight=sample_weight, **kwargs
              )
          ]
      )
  
file_path: dask-ml/dask_ml/metrics/classification.py
imports: from typing import Optional
  import dask
  import dask.array
  import numpy
  import sklearn.metrics
  import sklearn.utils.multiclass
  from .._typing import ArrayLike
label_desc: Use image node_id 2 for calling a global function with example usage: _log_loss_inner(x, y, sample_weight) and returns: np