$def with(loans)
$ carousel = loans_carousel(loans)
$if carousel:
$if len(loans):
$ loans_remaining = 5 - len(loans)
You can still borrow $loans_remaining more book$("" if loans_remaining == 1 else "s") until you've hit the limit!
$else:
You have reached the borrowing limit. Please return a book to checkout something new.
$:carousel