A helper function that will reduce duplication of data by
            reusing the parent contour tree's parameters and data

def build_for_contour_tree(self, contour_tree, negate=False):
        """ A helper function that will reduce duplication of data by
            reusing the parent contour tree's parameters and data
        """
        if self.debug:
            tree_type = "Join"
            if negate:
                tree_type = "Split"
            sys.stdout.write("{} Tree Computation: ".format(tree_type))
            start = time.clock()

        Y = contour_tree.Y
        if negate:
            Y = -Y

        self.__tree = MergeTreeFloat(
            vectorFloat(contour_tree.Xnorm.flatten()),
            vectorFloat(Y),
            str(contour_tree.gradient),
            contour_tree.graph_rep.full_graph(),
            self.debug,
        )
        self._internal_build()
        if self.debug:
            end = time.clock()
            sys.stdout.write("%f s\n" % (end - start))