code: private FPTree getLocalFPTree(FPTree.Node node, int[] localItemSupport, int[] prefixItemset) {
          FPTree tree = new FPTree(localItemSupport, minSupport);
  
          while (node != null) {
              Node parent = node.parent;
              int i = prefixItemset.length;
              while (parent != null) {
                  if (localItemSupport[parent.id] >= minSupport) {
                      prefixItemset[--i] = parent.id;
                  }
                  parent = parent.parent;
              }
              if (i < prefixItemset.length) {
                  tree.add(i, prefixItemset.length, prefixItemset, node.count);
              }
  
              node = node.next;
          }
  
          return tree;
      }
docs: Generates a local FP tree
  @param node the conditional patterns given this node to construct the local FP-tree.
  @rerurn the local FP-tree.