class_docstr: Abstract base dispatcher for pairwise distance computation & reduction.
  
  Each dispatcher extending the base :class:`BaseDistancesReductionDispatcher`
  dispatcher must implement the :meth:`compute` classmethod.
class_docstr_tok: ["Abstract","base","dispatcher","for","pairwise","distance","computation","&","reduction",".","Each","dispatcher","extending","the","base",":","class",":","`","BaseDistancesReductionDispatcher","`","dispatcher","must","implement","the",":","meth",":","`","compute","`","classmethod","."]
code: def valid_metrics(cls) -> List[str]:
      excluded = {
          # PyFunc cannot be supported because it necessitates interacting with
          # the CPython interpreter to call user defined functions.
          "pyfunc",
          "mahalanobis",  # is numerically unstable
          # In order to support discrete distance metrics, we need to have a
          # stable simultaneous sort which preserves the order of the indices
          # because there generally is a lot of occurrences for a given values
          # of distances in this case.
          # TODO: implement a stable simultaneous_sort.
          "hamming",
          *BOOL_METRICS,
      }
      return sorted(
          ({"sqeuclidean"} | set(METRIC_MAPPING64.keys())) - excluded
      )
  
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, DistanceMetric
  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
  from ._radius_neighbors_classmode import RadiusNeighborsClassMode32, RadiusNeighborsClassMode64
label_desc: Use image node_id 1 for calling the BaseDistancesReductionDispatcher obj's underlying member method code with example usage: obj.valid_metrics(cls) and returns: sorted