code: def test_map_groups() -> None:
      df = pl.DataFrame(
          {
              "a": ["a", "b", "a", "b", "b", "c"],
              "b": [1, 2, 3, 4, 5, 6],
              "c": [6, 5, 4, 3, 2, 1],
          }
      )
  
      result = df.group_by("a").map_groups(lambda df: df[["c"]].sum())
  
      expected = pl.DataFrame({"c": [10, 10, 1]})
      assert_frame_equal(result, expected, check_row_order=False)
  
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 1 for calling a global function with example usage: test_map_groups() without return types