<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def push(self, element, value):
 """Push an ``element`` into the datastrucutre together with its value and only save it if it currently is one of the top n elements. Drop elements if necessary. """

        insert_pos = 0
        for index, el in enumerate(self.tops):
            if not self.find_min and el[1] >= value:
                insert_pos = index+1
            elif self.find_min and el[1] <= value:
                insert_pos = index+1
        self.tops.insert(insert_pos, [element, value])
        self.tops = self.tops[:self.n]