code: def check(self, df):
      group = self.cfg.get("group")
      duplicates = df[group].reset_index().groupby(group).count()
      duplicates = duplicates.iloc[:, 0]
      duplicates = duplicates[duplicates > 1]
      duplicate_counts = duplicates.values
      duplicates = duplicates.reset_index()[group]
      duplicates = grid_formatter(
          grid_columns(duplicates), as_string=True
      ).format_lists(duplicates)
      check_data = {
          ", ".join([duplicates[col][i] for col in group]): dict(
              count=int(ct),
              filter=[duplicates[col][i] for col in group],
          )
          for i, ct in enumerate(duplicate_counts)
      }
      return check_data
  
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 ShowDuplicates obj's underlying member method code with example usage: obj.check(df) and returns: check_data