code: def get_obj(df: DataFrame, klass):
      """
      For sharing tests using frame_or_series, either return the DataFrame
      unchanged or return it's first column as a Series.
      """
      if klass is DataFrame:
          return df
      return df._ixs(0, axis=1)
  
imports: from pandas._typing import DtypeObj
  from pandas import DataFrame
label_desc: Use image node_id 2 for calling a global function with example usage: get_obj(df, klass) and returns: df, df