code: def check_metric(self, metric):
      import pynndescent
  
      if not np.array_equal(
          list(pynndescent.distances.named_distances),
          self.VALID_METRICS,
      ):
          warnings.warn(
              "`pynndescent` has recently changed which distance metrics are supported, "
              "and `openTSNE.nearest_neighbors` has not been updated. Please notify the "
              "developers of this change."
          )
  
      if callable(metric):
          from numba.core.registry import CPUDispatcher
  
          if not isinstance(metric, CPUDispatcher):
              warnings.warn(
                  f"`pynndescent` requires callable metrics to be "
                  f"compiled with `numba`, but `{metric.__name__}` is not compiled. "
                  f"`openTSNE.nearest_neighbors.NNDescent` "
                  f"will attempt to compile the function. "
                  f"If this results in an error, then the function may not be "
                  f"compatible with `numba.njit` and should be rewritten. "
                  f"Otherwise, set `neighbors`='exact' to use `scikit-learn` "
                  f"for calculating nearest neighbors."
              )
              from numba import njit
  
              metric = njit(fastmath=True)(metric)
  
      return super().check_metric(metric)
  
imports: import logging
  import os
  import warnings
  import numpy
  from scipy.spatial.distance import cdist
  from sklearn import neighbors
  from sklearn.utils import check_random_state
  from openTSNE import utils
label_desc: Use image node_id 2 for calling the NNDescent obj's underlying member method code with example usage: obj.check_metric(metric) and returns: super