code: def kde(data, grid, package, **kwargs):
      
      if package == 'statsmodels':
          package = 'statsmodels-m'
      func = KDE_FUNCS[package]
      return func(data, grid, **kwargs)
docs: Kernel Density Estimation
  
      Parameters
      ----------
      package : str
          Package whose kernel density estimation to use.
          Should be one of
          `['statsmodels-u', 'statsmodels-m', 'scipy', 'sklearn']`.
      data : numpy.array
          Data points used to compute a density estimator. It
          has `n x p` dimensions, representing n points and p
          variables.
      grid : numpy.array
          Data points at which the desity will be estimated. It
          has `m x p` dimensions, representing m points and p
          variables.
  
      Returns
      -------
      out : numpy.array
          Density estimate. Has `m x 1` dimensions