docstr: Discretizes the the data in `x` using the quantiles in `qts`.
  This is achieved by searching for the index of each value in `x`
  into `qts`, which is assumed to be a 1-D sorted array.
  
  Parameters
  ----------
  x
      A `numpy` array of data to be discretized
  qts:
      A `numpy` array of percentiles. This should be a 1-D array sorted in
      ascending order.
  
  Returns
  -------
  A discretized data `numpy` array.
code: def get_percentiles(x: np.ndarray, qts: np.ndarray) -> np.ndarray:
      """
      Discretizes the the data in `x` using the quantiles in `qts`.
      This is achieved by searching for the index of each value in `x`
      into `qts`, which is assumed to be a 1-D sorted array.
  
      Parameters
      ----------
      x
          A `numpy` array of data to be discretized
      qts:
          A `numpy` array of percentiles. This should be a 1-D array sorted in
          ascending order.
  
      Returns
      -------
      A discretized data `numpy` array.
      """
  
      if len(qts.shape) != 1:
          raise ValueError("Expected 1D quantiles array!")
      if not issorted(qts):
          raise ValueError("Quantiles array should be sorted!")
      return np.searchsorted(qts, x)
  
file_path: alibi/alibi/utils/discretizer.py
imports: import numpy
  from alibi.tests.utils import issorted
  from functools import partial
  from typing import Dict, Callable, List, Sequence, Union
label_desc: Use image node_id 2 for calling the Discretizer obj's underlying member method code with example usage: obj.get_percentiles(x, qts) and returns: np