code: def set_row_positions(self):
          
          self.row_positions = [i * self.row_height for i in range(len(self.rows))]
          self.set_size_request(0, self.row_positions[-1] + self.row_height if self.row_positions else 0)
docs: creates a list of row positions for simpler manipulation