code: def test_regex_expansion_group_by_9947() -> None:
      df = pl.DataFrame({"g": [3], "abc": [1], "abcd": [3]})
      assert df.group_by("g").agg(pl.col("^ab.*$")).columns == [
          "g",
          "abc",
          "abcd",
      ]
  
imports: from typing import Any
  import pytest
  import polars
  import polars.selectors
  from polars.selectors import expand_selector, is_selector
  from polars.testing import assert_frame_equal
label_desc: Use image node_id 25 for calling a global function with example usage: test_regex_expansion_group_by_9947() without return types