code: def select_required_input_columns(
      tileable_data: TileableData, required_cols: Set[Any]
  ) -> Dict[TileableData, Set[Any]]:
      ret = {}
      for inp in tileable_data.op.inputs:
          if isinstance(inp, BaseDataFrameData):
              ret[inp] = required_cols.intersection(
                  set(inp.dtypes.index)
              )
          elif isinstance(inp, BaseSeriesData):
              ret[inp] = {inp.name}
      return ret
  
imports: from collections import defaultdict
  from typing import Callable, Dict, Any, Set
  from .....core import TileableData
  from .....dataframe import NamedAgg
  from .....dataframe.arithmetic.core import DataFrameBinOp, DataFrameUnaryOp
  from .....dataframe.core import BaseDataFrameData, BaseSeriesData
  from .....dataframe.groupby.aggregation import DataFrameGroupByAgg
  from .....dataframe.indexing.getitem import DataFrameIndex
  from .....dataframe.indexing.setitem import DataFrameSetitem
  from .....dataframe.merge import DataFrameMerge
  from .....typing import OperandType
  from .utils import get_cols_exclude_index
label_desc: Use image node_id 2 for calling the InputColumnSelector obj's underlying member method code with example usage: obj.select_required_input_columns(tileable_data, required_cols) and returns: ret