code: def get_partitions(self, persistence=None):
          
          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():
              min_index = key[0]
              max_index = key[1]
              while (
                  self.merge_sequence[min_index][0] < persistence
                  and self.merge_sequence[min_index][1] != min_index
              ):
                  min_index = self.merge_sequence[min_index][1]
              while (
                  self.merge_sequence[max_index][0] < persistence
                  and self.merge_sequence[max_index][1] != max_index
              ):
                  max_index = self.merge_sequence[max_index][1]
              new_key = (min_index, max_index)
              if new_key not in partitions:
                  partitions[new_key] = []
              partitions[new_key].extend(items.tolist())
  
          for key in partitions:
              partitions[key] = sorted(list(set(partitions[key])))
          return partitions
docs: 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 min-max tuple
              specifying the index of the minimum and maximum,
              respectively. Each entry will hold a list of indices
              specifying points that are associated to this min-max pair.