code: def test_df_groupby_index_agg():
      df: DataFrame = DataFrame({"foo": (1, 1, 3), "bar": (4, 5, 6)})
      df = df.set_index("foo")
      s = df.groupby(by="foo").sum()
      input_columns = InputColumnSelector.select(s.data, {"bar"})
      assert len(input_columns) == 1
      assert df.data in input_columns
      assert input_columns[df.data] == {"bar"}
  
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 3 for calling a global function with example usage: test_df_groupby_index_agg() without return types