code: def check(self, df):
      duplicate_columns = {}
      keep = self.cfg.get("keep") or "none"
      col_indexes = list(range(df.shape[1]))
      if keep == "last":
          col_indexes = col_indexes[::-1]
      for x_idx, x in enumerate(col_indexes):
          col = df.iloc[:, x]
          col_duplicates = duplicate_columns.get(
              df.columns.values[x], []
          )
          for y in col_indexes[x_idx + 1 :]:
              other_col = df.iloc[:, y]
              if col.equals(other_col):
                  col_duplicates.append(df.columns.values[y])
          duplicate_columns[df.columns.values[x]] = col_duplicates
      return {k: v for k, v in duplicate_columns.items() if len(v) > 0}
  
imports: import pandas
  import dtale.global_state
  from dtale.query import run_query
  from dtale.utils import dict_merge, grid_columns, grid_formatter, triple_quote
  from dtale.charts.utils import build_group_inputs_filter
label_desc: Use image node_id 2 for calling the DuplicateColumns obj's underlying member method code with example usage: obj.check(df) and returns: unknown