public static BlockNode makeNodeWithStack(Workspace workspace, Long blockID) {
        if (isNullBlockInstance(workspace, blockID)) {
            return null;
        }
        Block block = workspace.getEnv().getBlock(blockID);
        String genus = block.getGenusName();
        String parentGenus = block instanceof BlockStub ? ((BlockStub) block).getParentGenus() : null;
        String label;
        if (!block.labelMustBeUnique() || block instanceof BlockStub) {
            label = block.getBlockLabel();
        } else {
            label = null;
        }
        BlockNode node = new BlockNode(genus, parentGenus, label);
        for (BlockConnector socket : block.getSockets()) {
            if (socket.hasBlock()) {
                node.addChild(makeNodeWithStack(workspace, socket.getBlockID()));
            }
        }
        if (block.hasAfterConnector()) {
            node.setAfter(makeNodeWithStack(workspace, block.getAfterBlockID()));
        }
        return node;
    }