code: def fpg_step(tree, minsup, colnames, max_len, verbose):
      """
      Performs a recursive step of the fpgrowth algorithm.
  
      Parameters
      ----------
      tree : FPTree
      minsup : int
  
      Yields
      ------
      lists of strings
          Set of items that has occurred in minsup itemsets.
      """
      count = 0
      items = tree.nodes.keys()
      if tree.is_path():
          # If the tree is a path, we can combinatorally generate all
          # remaining itemsets without generating additional conditional trees
          size_remain = len(items) + 1
          if max_len:
              size_remain = max_len - len(tree.cond_items) + 1
          for i in range(1, size_remain):
              for itemset in itertools.combinations(items, i):
                  count += 1
                  support = min(
                      [tree.nodes[i][0].count for i in itemset]
                  )
                  yield support, tree.cond_items + list(itemset)
      elif not max_len or max_len > len(tree.cond_items):
          for item in items:
              count += 1
              support = sum([node.count for node in tree.nodes[item]])
              yield support, tree.cond_items + [item]
  
      if verbose:
          tree.print_status(count, colnames)
  
      # Generate conditional trees to generate frequent itemsets one item larger
      if not tree.is_path() and (
          not max_len or max_len > len(tree.cond_items)
      ):
          for item in items:
              cond_tree = tree.conditional_tree(item, minsup)
              for sup, iset in fpg_step(
                  cond_tree, minsup, colnames, max_len, verbose
              ):
                  yield sup, iset
  
imports: import itertools
  import math
  from ..frequent_patterns import fpcommon
label_desc: Use image node_id 2 for calling a global function with example usage: fpg_step(tree, minsup, colnames, max_len, verbose) without return types