code: def _brentq_cdf(self, value):
          
          # The decorator expects an instance method, but usually are decorated before being bounded
          bound_cdf = partial(scalarize(GaussianKDE.cumulative_distribution), self)
  
          def f(x):
              return bound_cdf(x) - value
  
          return f
docs: Helper function to compute percent_point.
  
          As scipy.stats.gaussian_kde doesn't provide this functionality out of the box we need
          to make a numerical approach:
  
          - First we scalarize and bound cumulative_distribution.
          - Then we define a function `f(x) = cdf(x) - value`, where value is the given argument.
          - As value will be called from ppf we can assume value = cdf(z) for some z that is the
          value we are searching for. Therefore the zeros of the function will be x such that:
          cdf(x) - cdf(z) = 0 => (becasue cdf is monotonous and continous) x = z
  
          Args:
              value(float): cdf value, that is, in [0,1]
  
          Returns:
              callable: function whose zero is the ppf of value.