def insert(self, i, item_weight):
        """
        Insert an item with the given weight in the sequence
        """
        item, weight = item_weight
        self._seq.insert(i, item)
        self.weight += weight
def insert ( self , i , item_weight ) : item , weight = item_weight self . _seq . insert ( i , item ) self . weight += weight
Insert an item with the given weight in the sequence