code: def test_datatypes():
      res_df = association_rules(df_freq_items)
      for i in res_df["antecedents"]:
          assert isinstance(i, frozenset) is True
  
      for i in res_df["consequents"]:
          assert isinstance(i, frozenset) is True
  
      # cast itemset-containing dataframe to set and
      # check if association_rule converts it internally
      # back to frozensets
      df_freq_items_copy = df_freq_items.copy()
      df_freq_items_copy["itemsets"] = df_freq_items_copy[
          "itemsets"
      ].apply(lambda x: set(x))
  
      res_df = association_rules(df_freq_items)
      for i in res_df["antecedents"]:
          assert isinstance(i, frozenset) is True
  
      for i in res_df["consequents"]:
          assert isinstance(i, frozenset) is True
  
imports: import numpy
  import pandas
  import pytest
  from numpy.testing import assert_raises
  from mlxtend.frequent_patterns import apriori, association_rules
label_desc: Use image node_id 2 for calling a global function with example usage: test_datatypes() without return types