<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def demo(printer, **kwargs):
 """ Prints specificed demos. Called when CLI is passed `demo`. This function uses the DEMO_FUNCTIONS dictionary. :param printer: A printer from escpos.printer :param kwargs: A dict with a key for each function you want to test. It's in this format since it usually comes from argparse. """

    for demo_choice in kwargs.keys():
        command = getattr(
            printer,
            demo_choice
            .replace('barcodes_a', 'barcode')
            .replace('barcodes_b', 'barcode')
        )
        for params in DEMO_FUNCTIONS[demo_choice]:
            command(**params)
        printer.cut()