code: def _discretize(a):
      """Discretizes array values to class labels."""
      arr = np.asarray(a)
      index = np.argsort(arr)
      inverse_index = np.zeros(arr.size, dtype=np.intp)
      inverse_index[index] = np.arange(arr.size, dtype=np.intp)
      arr = arr[index]
      obs = np.r_[True, arr[1:] != arr[:-1]]
      return obs.cumsum()[inverse_index] - 1
  
imports: import numpy
  import tensorflow_datasets.public_api
label_desc: Use image node_id 1 for calling a global function with example usage: _discretize(a) and returns: unknown