code: def pairwise_distances(
      X: da.Array,
      Y: ArrayLike,
      metric: Union[
          str, Callable[[ArrayLike, ArrayLike], float]
      ] = "euclidean",
      n_jobs: Optional[int] = None,
      **kwargs: Any,
  ):
      if isinstance(Y, da.Array):
          raise TypeError("`Y` must be a numpy array")
      chunks = (X.chunks[0], (len(Y),))
      return X.map_blocks(
          metrics.pairwise_distances,
          Y,
          dtype=float,
          chunks=chunks,
          metric=metric,
          **kwargs,
      )
  
file_path: dask-ml/dask_ml/metrics/pairwise.py
imports: import warnings
  from typing import Any, Callable, Dict, Optional, Tuple, Union
  import dask.array
  import numpy
  from dask import delayed
  from dask.utils import derived_from
  from sklearn import metrics
  from sklearn.metrics.pairwise import KERNEL_PARAMS
  from .._typing import ArrayLike
  from ..utils import row_norms
label_desc: Use image node_id 2 for calling a global function with example usage: pairwise_distances(X, Y, metric, n_jobs) and returns: X