docstr: Compute K-S scores and statistics per feature.
  
  Parameters
  ----------
  x_ref
      Reference instances to compare distribution with.
  x
      Batch of instances.
  
  Returns
  -------
  Feature level p-values and K-S statistics.
code: def feature_score(
      self, x_ref: np.ndarray, x: np.ndarray
  ) -> Tuple[np.ndarray, np.ndarray]:
      """
      Compute K-S scores and statistics per feature.
  
      Parameters
      ----------
      x_ref
          Reference instances to compare distribution with.
      x
          Batch of instances.
  
      Returns
      -------
      Feature level p-values and K-S statistics.
      """
      x = x.reshape(x.shape[0], -1)
      x_ref = x_ref.reshape(x_ref.shape[0], -1)
      p_val = np.zeros(self.n_features, dtype=np.float32)
      dist = np.zeros_like(p_val)
      for f in range(self.n_features):
          # TODO: update to 'exact' when bug fix is released in scipy 1.5
          dist[f], p_val[f] = ks_2samp(
              x_ref[:, f],
              x[:, f],
              alternative=self.alternative,
              mode="asymp",
          )
      return p_val, dist
  
file_path: alibi-detect/alibi_detect/cd/ks.py
imports: import numpy
  from scipy.stats import ks_2samp
  from typing import Callable, Dict, Optional, Tuple, Union
  from alibi_detect.cd.base import BaseUnivariateDrift
  from alibi_detect.utils.warnings import deprecated_alias
label_desc: Use image node_id 2 for calling the KSDrift obj's underlying member method code with example usage: obj.feature_score(x_ref, x) and returns: p_val,  dist