class_docstr: Abstract base dispatcher for pairwise distance computation & reduction.
  
  Each dispatcher extending the base :class:`BaseDistancesReductionDispatcher`
  dispatcher must implement the :meth:`compute` classmethod.
docstr: Return True if the dispatcher can be used for the
  given parameters.
  
  Parameters
  ----------
  X : {ndarray, sparse matrix} of shape (n_samples_X, n_features)
      Input data.
  
  Y : {ndarray, sparse matrix} of shape (n_samples_Y, n_features)
      Input data.
  
  metric : str, default='euclidean'
      The distance metric to use.
      For a list of available metrics, see the documentation of
      :class:`~sklearn.metrics.DistanceMetric`.
  
  Returns
  -------
  True if the dispatcher can be used, else False.
docstr_tok: ["Return","True","if","the","dispatcher","can","be","used","for","the","given","parameters",".","Parameters","--","--","--","--","--","X",":","{","ndarray",",","sparse","matrix","}","of","shape","(","n_samples_X",",","n_features",")","Input","data",".","Y",":","{","ndarray",",","sparse","matrix","}","of","shape","(","n_samples_Y",",","n_features",")","Input","data",".","metric",":","str",",","default='euclidean'","The","distance","metric","to","use",".","For","a","list","of","available","metrics",",","see","the","documentation","of",":","class",":","`","~sklearn.metrics.DistanceMetric","`",".","Returns","--","--","--","-","True","if","the","dispatcher","can","be","used",",","else","False","."]
code: def is_usable_for(cls, X, Y, metric) -> bool:
      """Return True if the dispatcher can be used for the
      given parameters.
  
      Parameters
      ----------
      X : {ndarray, sparse matrix} of shape (n_samples_X, n_features)
          Input data.
  
      Y : {ndarray, sparse matrix} of shape (n_samples_Y, n_features)
          Input data.
  
      metric : str, default='euclidean'
          The distance metric to use.
          For a list of available metrics, see the documentation of
          :class:`~sklearn.metrics.DistanceMetric`.
  
      Returns
      -------
      True if the dispatcher can be used, else False.
      """
  
      def is_numpy_c_ordered(X):
          return hasattr(X, "flags") and getattr(
              X.flags, "c_contiguous", False
          )
  
      def is_valid_sparse_matrix(X):
          return (
              issparse(X)
              and X.format == "csr"
              and
              # TODO: support CSR matrices without non-zeros elements
              X.nnz > 0
              and
              # TODO: support CSR matrices with int64 indices and indptr
              # See: https://github.com/scikit-learn/scikit-learn/issues/23653
              X.indices.dtype == X.indptr.dtype == np.int32
          )
  
      is_usable = (
          get_config().get("enable_cython_pairwise_dist", True)
          and (is_numpy_c_ordered(X) or is_valid_sparse_matrix(X))
          and (is_numpy_c_ordered(Y) or is_valid_sparse_matrix(Y))
          and X.dtype == Y.dtype
          and X.dtype in (np.float32, np.float64)
          and metric in cls.valid_metrics()
      )
  
      return is_usable
  
imports: from abc import abstractmethod
  from typing import List
  import numpy
  from scipy.sparse import issparse
  from ...None import get_config
  from .._dist_metrics import BOOL_METRICS, METRIC_MAPPING64
  from ._argkmin import ArgKmin32, ArgKmin64
  from ._argkmin_classmode import ArgKminClassMode32, ArgKminClassMode64
  from ._base import _sqeuclidean_row_norms32, _sqeuclidean_row_norms64
  from ._radius_neighbors import RadiusNeighbors32, RadiusNeighbors64
label_desc: Use image node_id 2 for calling the BaseDistancesReductionDispatcher obj's underlying member method code with example usage: obj.is_usable_for(cls, X, Y, metric) and returns: is_usable, unknown, unknown