code: def test_df_groupby_agg():
      df: DataFrame = DataFrame(
          {
              "foo": (1, 1, 2, 2),
              "bar": (3, 4, 3, 4),
              "baz": (5, 6, 7, 8),
              "qux": (9, 10, 11, 12),
          }
      )
  
      s = df.groupby(by="foo")["baz"].sum()
      input_columns = InputColumnSelector.select(s.data, {"baz"})
      assert len(input_columns) == 1
      assert df.data in input_columns
      assert input_columns[df.data] == {"foo", "baz"}
  
      s = df.groupby(by=["foo", "bar"]).sum()
      input_columns = InputColumnSelector.select(s.data, {"baz"})
      assert len(input_columns) == 1
      assert df.data in input_columns
      assert input_columns[df.data] == {"foo", "bar", "baz"}
  
      s = df.groupby(by="foo").agg(["sum", "max"])
      input_columns = InputColumnSelector.select(s.data, {"baz"})
      assert len(input_columns) == 1
      assert df.data in input_columns
      assert input_columns[df.data] == {"foo", "baz"}
  
      s = df.groupby(by="foo")["bar", "baz"].agg(["sum", "max"])
      input_columns = InputColumnSelector.select(s.data, {"baz"})
      assert len(input_columns) == 1
      assert df.data in input_columns
      assert input_columns[df.data] == {"foo", "bar", "baz"}
  
      s = df.groupby(by="foo").agg(
          new_bar=("bar", "sum"), new_baz=("baz", "sum")
      )
      input_columns = InputColumnSelector.select(s.data, {"new_bar"})
      assert len(input_columns) == 1
      assert df.data in input_columns
      assert input_columns[df.data] == {"foo", "bar", "baz"}
  
imports: from typing import Dict, Any, Set, List, Union
  import pytest
  from ..input_column_selector import InputColumnSelector
  from ......core import TileableData, ENTITY_TYPE
  from ......core.operand import Operand
  from ......dataframe import DataFrame, Series
  from ......tensor import tensor
label_desc: Use image node_id 2 for calling a global function with example usage: test_df_groupby_agg() without return types