class_docstr: Compute density estimation for each point
  
  {usage}
  
  Parameters
  ----------
  {common_parameters}
  package : Literal["statsmodels", "scipy", "sklearn"], default="statsmodels"
      Package whose kernel density estimation to use.
  kde_params : dict, default=None
      Keyword arguments to pass on to the kde class.
  
  See Also
  --------
  statsmodels.nonparametric.kde.KDEMultivariate
  scipy.stats.gaussian_kde
  sklearn.neighbors.KernelDensity
code: def compute_group(cls, data, scales, **params):
      package = params["package"]
      kde_params = params["kde_params"]
  
      var_data = np.array(
          [data["x"].to_numpy(), data["y"].to_numpy()]
      ).T
      density = kde(var_data, var_data, package, **kde_params)
  
      data = pd.DataFrame(
          {
              "x": data["x"],
              "y": data["y"],
              "density": density.flatten(),
          }
      )
  
      return data
  
file_path: plotnine/plotnine/stats/stat_pointdensity.py
imports: import numpy
  import pandas
  from ..doctools import document
  from ..mapping.evaluation import after_stat
  from .density import get_var_type, kde
  from .stat import stat
label_desc: Use image node_id 2 for calling the stat_pointdensity obj's underlying member method code with example usage: obj.compute_group(cls, data, scales) and returns: data