code: def pairwise_distances_argmin(
      X,
      Y,
      axis=1,
      metric="euclidean",
      batch_size=500,
      metric_kwargs=None,
  ):
      """Compute minimum distances between one point and a set of points.
  
      This function computes for each row in X, the index of the row of Y which
      is closest (according to the specified distance).
  
      This is mostly equivalent to calling:
  
          pairwise_distances(X, Y=Y, metric=metric).argmin(axis=axis)
  
      but uses much less memory, and is faster for large arrays.
  
      This function works with dense 2D arrays only.
  
      Parameters
      ----------
      X : array-like
          Arrays containing points. Respective shapes (n_samples1, n_features)
          and (n_samples2, n_features)
  
      Y : array-like
          Arrays containing points. Respective shapes (n_samples1, n_features)
          and (n_samples2, n_features)
  
      batch_size : integer
          To reduce memory consumption over the naive solution, data are
          processed in batches, comprising batch_size rows of X and
          batch_size rows of Y. The default value is quite conservative, but
          can be changed for fine-tuning. The larger the number, the larger the
          memory usage.
  
      metric : string or callable
          metric to use for distance computation. Any metric from scikit-learn
          or scipy.spatial.distance can be used.
  
          If metric is a callable function, it is called on each
          pair of instances (rows) and the resulting value recorded. The callable
          should take two arrays as input and return one value indicating the
          distance between them. This works for Scipy's metrics, but is less
          efficient than passing the metric name as a string.
  
          Distance matrices are not supported.
  
          Valid values for metric are:
  
          - from scikit-learn: ['cityblock', 'cosine', 'euclidean', 'l1', 'l2',
            'manhattan']
  
          - from scipy.spatial.distance: ['braycurtis', 'canberra', 'chebyshev',
            'correlation', 'dice', 'hamming', 'jaccard', 'kulsinski',
            'mahalanobis', 'matching', 'minkowski', 'rogerstanimoto',
            'russellrao', 'seuclidean', 'sokalmichener', 'sokalsneath',
            'sqeuclidean', 'yule']
  
          See the documentation for scipy.spatial.distance for details on these
          metrics.
  
      metric_kwargs : dict
          keyword arguments to pass to specified metric function.
  
      axis : int, optional, default 1
          Axis along which the argmin and distances are to be computed.
  
      Returns
      -------
      argmin : numpy.ndarray
          Y[argmin[i], :] is the row in Y that is closest to X[i, :].
  
      See also
      --------
      sklearn.metrics.pairwise_distances
      sklearn.metrics.pairwise_distances_argmin_min
      """
      if metric_kwargs is None:
          metric_kwargs = {}
  
      return pairwise_distances_argmin_min(
          X, Y, axis, metric, batch_size, metric_kwargs
      )[0]
  
imports: import itertools
  import numpy
  from scipy.spatial import distance
  from scipy.sparse import csr_matrix
  from scipy.sparse import issparse
  from ..utils import check_array
  from ..utils import gen_even_slices
  from ..utils import gen_batches
  from ..utils.fixes import partial
  from ..utils.extmath import row_norms, safe_sparse_dot
  from ..preprocessing import normalize
  from ..externals.joblib import Parallel
  from ..externals.joblib import delayed
  from ..externals.joblib import cpu_count
  from .pairwise_fast import _chi2_kernel_fast, _sparse_manhattan
label_desc: Use image node_id 6 for calling a global function with example usage: pairwise_distances_argmin(X, Y, axis, metric, batch_size, metric_kwargs) and returns: pairwise_distances_argmin_min