code: def test_map_groups_empty() -> None:
      df = pl.DataFrame(schema={"x": pl.Int64})
      with pytest.raises(
          pl.ComputeError,
          match=r"cannot group_by \+ apply on empty 'DataFrame'",
      ):
          df.group_by("x").map_groups(lambda x: x)
  
file_path: polars/py-polars/tests/unit/operations/map/test_map_groups.py
imports: from __future__ import annotations
  from typing import Any, Sequence
  import numpy
  import pytest
  import polars
  from polars.testing import assert_frame_equal
label_desc: Use image node_id 4 for calling a global function with example usage: test_map_groups_empty() without return types