code: def pairwise_distances_argmin_min(
      X: da.Array,
      Y: ArrayLike,
      axis: int = 1,
      metric: Union[
          str, Callable[[ArrayLike, ArrayLike], float]
      ] = "euclidean",
      batch_size: Optional[int] = None,
      metric_kwargs: Optional[Dict[str, Any]] = None,
  ):
      if batch_size is not None:
          msg = "'batch_size' is deprecated. Use sklearn.config_context instead.'"
          warnings.warn(msg, FutureWarning)
  
      XD = X.to_delayed().flatten().tolist()
      func = delayed(
          metrics.pairwise_distances_argmin_min, pure=True, nout=2
      )
      blocks = [
          func(x, Y, metric=metric, metric_kwargs=metric_kwargs)
          for x in XD
      ]
      argmins, mins = zip(*blocks)
  
      argmins = [
          da.from_delayed(block, (chunksize,), np.int64)
          for block, chunksize in zip(argmins, X.chunks[0])
      ]
      # Scikit-learn seems to always use float64
      mins = [
          da.from_delayed(block, (chunksize,), "f8")
          for block, chunksize in zip(mins, X.chunks[0])
      ]
      argmins = da.concatenate(argmins)
      mins = da.concatenate(mins)
      return argmins, mins
  
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 1 for calling a global function with example usage: pairwise_distances_argmin_min(X, Y, axis, metric, batch_size, metric_kwargs) and returns: argmins,  mins