Elaborating on the print_transactions() function