code: def itemset_optimisation(
      itemsets: np.array,
      single_items: np.array,
      minsup: int,
  ) -> tuple:
      """
      Downward-closure property of H-Mine algorithm.
          Optimizes the itemsets matrix by removing items that do not
          meet the minimum support. (For more info, see
          https://rasbt.github.io/mlxtend/user_guide/frequent_patterns/hmine/)
  
      Args:
          itemsets (np.array): matrix of bools or binary
          single_items (np.array): array of single items
          minsup (int): minimum absolute support
  
      Returns:
          itemsets (np.array): reduced itemsets matrix of bools or binary
          single_items (np.array): reduced array of single items
          single_items_support (np.array): reduced single items support
      """
  
      single_items_support = np.array(np.sum(itemsets, axis=0)).reshape(
          -1
      )
      items = np.nonzero(single_items_support >= minsup)[0]
      itemsets = itemsets[:, items]
      single_items = single_items[items]
      single_items_support = single_items_support[items]
  
      return itemsets, single_items, single_items_support
  
imports: import math
  import numpy
  import pandas
  from ..frequent_patterns import fpcommon
label_desc: Use image node_id 2 for calling a global function with example usage: itemset_optimisation(itemsets, single_items, minsup) and returns: itemsets,  single_items,  single_items_support