code: def df_groupby_getitem(df_groupby, item):
      try:
          hash(item)
          hashable = True
      except TypeError:
          hashable = False
  
      if hashable and item in df_groupby.dtypes:
          output_types = [OutputType.series_groupby]
      elif isinstance(item, Iterable) and all(
          it in df_groupby.dtypes for it in item
      ):
          output_types = [OutputType.dataframe_groupby]
      else:
          raise NameError(f"Cannot slice groupby with {item!r}")
  
      if df_groupby.selection:
          raise IndexError(
              f"Column(s) {df_groupby.selection!r} already selected"
          )
  
      op = GroupByIndex(selection=item, output_types=output_types)
      return op(df_groupby)
  
file_path: mars/mars/dataframe/groupby/getitem.py
imports: from collections.abc import Iterable
  from ...None import opcodes
  from ...core import OutputType
  from ...serialization.serializables import AnyField
  from ..operands import DataFrameOperandMixin, DataFrameOperand
  from ..utils import parse_index
label_desc: Use image node_id 1 for calling a global function with example usage: df_groupby_getitem(df_groupby, item) and returns: op