Returns the partitioned data based on a specified
            persistence level.
            @ In, persistence, a floating point value specifying the
            size of the smallest feature we want to track.
            Default = None means consider all features.
            @ Out, a dictionary lists where each key is a integer
            specifying the index of the maximum. Each entry will hold a
            list of indices specifying points that are associated to
            this maximum.

def get_partitions(self, persistence=None):
        """ Returns the partitioned data based on a specified
            persistence level.
            @ In, persistence, a floating point value specifying the
            size of the smallest feature we want to track.
            Default = None means consider all features.
            @ Out, a dictionary lists where each key is a integer
            specifying the index of the maximum. Each entry will hold a
            list of indices specifying points that are associated to
            this maximum.
        """
        if persistence is None:
            persistence = self.persistence
        partitions = {}
        # TODO: Possibly cache at the critical persistence values,
        # previously caching was done at every query level, but that
        # does not make sense as the partitions will only change once
        # the next value in self.persistences is attained. Honestly,
        # this is probably not a necessary optimization that needs to
        # be made. Consider instead, Yarden's way of storing the points
        # such that merged arrays will be adjacent.
        for key, items in self.base_partitions.items():
            new_key = key
            while (
                self.merge_sequence[new_key][0] < persistence
                and self.merge_sequence[new_key][1] != new_key
            ):
                new_key = self.merge_sequence[new_key][1]
            if new_key not in partitions:
                partitions[new_key] = []
            partitions[new_key].extend(items)

        for key in partitions:
            partitions[key] = sorted(list(set(partitions[key])))

        return partitions