code: def compare_dataframes(df1, df2):
      itemsets1 = [sorted(list(i)) for i in df1["itemsets"]]
      itemsets2 = [sorted(list(i)) for i in df2["itemsets"]]
  
      rows1 = sorted(zip(itemsets1, df1["support"]))
      rows2 = sorted(zip(itemsets2, df2["support"]))
  
      for row1, row2 in zip(rows1, rows2):
          if row1[0] != row2[0]:
              msg = f"Expected different frequent itemsets\nx:{row1[0]}\ny:{row2[0]}"
              raise AssertionError(msg)
          elif row1[1] != row2[1]:
              msg = f"Expected different support\nx:{row1[1]}\ny:{row2[1]}"
              raise AssertionError(msg)
  
imports: import sys
  from contextlib import contextmanager
  from io import StringIO
  import numpy
  import pandas
  from numpy.testing import assert_array_equal
  from packaging.version import Version
  from pandas import __version__
  from scipy.sparse import csr_matrix
  from mlxtend.preprocessing import TransactionEncoder
  from mlxtend.utils import assert_raises
label_desc: Use image node_id 2 for calling a global function with example usage: compare_dataframes(df1, df2) without return types