def _autoextend_reservation(self):
time = timezone.now()<EOL>time_elapsed_since_updated = (time - self.cart.time_last_updated)<EOL>residual = self.cart.reservation_duration - time_elapsed_since_updated<EOL>reservations = [datetime.timedelta(<NUM_LIT:0>), residual]<EOL>if len(self.cart.vouchers.all()) >= <NUM_LIT:1>:<EOL><INDENT>reservations.append(inventory.Voucher.RESERVATION_DURATION)<EOL><DEDENT>items = commerce.ProductItem.objects.filter(cart=self.cart)<EOL>agg = items.aggregate(Max("<STR_LIT>"))<EOL>product_max = agg["<STR_LIT>"]<EOL>if product_max is not None:<EOL><INDENT>reservations.append(product_max)<EOL><DEDENT>self.cart.time_last_updated = time<EOL>self.cart.reservation_duration = max(reservations)<EOL>
Updates the cart's time last updated value, which is used to
        determine whether the cart has reserved the items and discounts it
        holds.