class_docstr: Base class of all stats
docstr: Calculate statistics for the group
  
  All stats should implement this method
  
  Parameters
  ----------
  data :
      Data for a group
  scales :
      x (``scales.x``) and y (``scales.y``) scale objects.
      The most likely reason to use scale information is
      to find out the physical size of a scale. e.g.
  
      ```python
      range_x = scales.x.dimension()
      ```
  params :
      Parameters
docstr_tok: ["Calculate","statistics","for","the","group","All","stats","should","implement","this","method","Parameters","--","--","--","--","--","data",":","Data","for","a","group","scales",":","x","(","``","scales.x","``",")","and","y","(","``","scales.y","``",")","scale","objects",".","The","most","likely","reason","to","use","scale","information","is","to","find","out","the","physical","size","of","a","scale",".","e.g",".","``","`","python","range_x","=","scales.x.dimension","(",")","``","`","params",":","Parameters"]
code: def compute_group(
      cls, data: pd.DataFrame, scales: pos_scales, **params: Any
  ) -> pd.DataFrame:
      """
      Calculate statistics for the group
  
      All stats should implement this method
  
      Parameters
      ----------
      data :
          Data for a group
      scales :
          x (``scales.x``) and y (``scales.y``) scale objects.
          The most likely reason to use scale information is
          to find out the physical size of a scale. e.g.
  
          ```python
          range_x = scales.x.dimension()
          ```
      params :
          Parameters
      """
      msg = "{} should implement this method."
      raise NotImplementedError(msg.format(cls.__name__))
  
imports: from __future__ import annotations
  import typing
  from copy import deepcopy
  import pandas
  from .._utils import check_required_aesthetics, copy_keys, data_mapping_as_kwargs, groupby_apply, remove_missing, uniquecols
  from .._utils.registry import Register, Registry
  from ..exceptions import PlotnineError
  from ..layer import layer
  from ..mapping import aes
  from abc import ABC
label_desc: Use image node_id 11 for calling the stat obj's underlying member method code with example usage: obj.compute_group(cls, data, scales) without return types