code: def test_confidence():
      res_df = association_rules(
          df_freq_items, min_threshold=0.8, metric="confidence"
      )
      assert res_df.values.shape[0] == 9
  
      res_df = association_rules(
          df_freq_items_with_colnames,
          min_threshold=0.8,
          metric="confidence",
      )
      assert res_df.values.shape[0] == 9
  
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 10 for calling a global function with example usage: test_confidence() without return types