class_docstr: Base class of all stats
docstr: Make a layer that represents this stat
  
  Returns
  -------
  out :
      Layer
docstr_tok: ["Make","a","layer","that","represents","this","stat","Returns","--","--","--","-","out",":","Layer"]
code: def to_layer(self) -> layer:
      """
      Make a layer that represents this stat
  
      Returns
      -------
      out :
          Layer
      """
      # Create, geom from stat, then layer from geom
      from ..geoms.geom import geom
  
      return layer.from_geom(geom.from_stat(self))
  
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 13 for calling the stat obj's underlying member method code with example usage: obj.to_layer() and returns: layer