code: def fpmax_step(tree, minsup, mfit, colnames, max_len, verbose):
      count = 0
      items = list(tree.nodes.keys())
      largest_set = sorted(tree.cond_items + items, key=mfit.rank.get)
      if len(largest_set) == 0:
          return
      if tree.is_path():
          if not mfit.contains(largest_set):
              count += 1
              largest_set.reverse()
              mfit.cache = largest_set
              mfit.insert_itemset(largest_set)
              if max_len is None or len(largest_set) <= max_len:
                  support = tree.root.count
                  if len(items) > 0:
                      support = min(
                          [tree.nodes[i][0].count for i in items]
                      )
                  yield support, largest_set
  
      if verbose:
          tree.print_status(count, colnames)
  
      if not tree.is_path() and (
          not max_len or max_len > len(tree.cond_items)
      ):
          # Loop over each item in tree creating another conditional tree
          items.sort(key=tree.rank.get)
          for item in items:
              # Check if the tree will produce a subset already produced
              if mfit.contains(largest_set):
                  return
              largest_set.remove(item)
              cond_tree = tree.conditional_tree(item, minsup)
              for support, mfi in fpmax_step(
                  cond_tree, minsup, mfit, colnames, max_len, verbose
              ):
                  yield support, mfi
  
file_path: mlxtend/mlxtend/frequent_patterns/fpmax.py
imports: import collections
  import math
  from ..frequent_patterns import fpcommon
label_desc: Use image node_id 2 for calling a global function with example usage: fpmax_step(tree, minsup, mfit, colnames, max_len, verbose) without return types