class_docstr: Base class for objects that apply statistical transformations.
docstr: Warn if vars are named in parameter without being present in the data.
code: def _check_grouping_vars(
      self,
      param: str,
      data_vars: list[str],
      stacklevel: int = 2,
  ) -> None:
      """Warn if vars are named in parameter without being present in the data."""
      param_vars = getattr(self, param)
      undefined = set(param_vars) - set(data_vars)
      if undefined:
          param = f"{self.__class__.__name__}.{param}"
          names = ", ".join(f"{x!r}" for x in undefined)
          msg = f"Undefined variable(s) passed for {param}: {names}."
          warnings.warn(msg, stacklevel=stacklevel)
  
file_path: seaborn/seaborn/_stats/base.py
imports: from __future__ import annotations
  from collections.abc import Iterable
  from dataclasses import dataclass
  from typing import ClassVar, Any
  import warnings
  from typing import TYPE_CHECKING
label_desc: Use image node_id 2 for calling the Stat obj's underlying member method code with example usage: obj._check_grouping_vars(param, data_vars, stacklevel) without return types