code: def inverse_threshold_discretization(
      indexes: tp.List[int], arity: int = 2
  ) -> np.ndarray:
      indexes_arr = np.array(indexes, copy=True)
      assert not np.any(np.isnan(indexes_arr))
      pdf_bin_size = 1 / arity
      # We take the center of each bin (in the pdf space)
      x = scipy.stats.norm.ppf(indexes_arr * pdf_bin_size + (pdf_bin_size / 2))  # type: ignore
      nan_indices = np.where(np.isnan(x))
      x[nan_indices] = (
          np.sign(indexes_arr[nan_indices] - (arity / 2.0))
          * np.finfo(np.dtype("float")).max
      )
      return x
  
file_path: nevergrad/nevergrad/parametrization/discretization.py
imports: import warnings
  import numpy
  import scipy.stats
  import nevergrad.common.typing
label_desc: Use image node_id 2 for calling a global function with example usage: inverse_threshold_discretization(indexes, arity) and returns: x