<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def run(self, args):
 """Flashes the device connected to the J-Link. Args: self (FlashCommand):
 the ``FlashCommand`` instance args (Namespace):
 the arguments passed on the command-line Returns: ``None`` """

        kwargs = {}
        kwargs['path'] = args.file[0]
        kwargs['addr'] = args.addr
        kwargs['on_progress'] = pylink.util.flash_progress_callback

        jlink = self.create_jlink(args)
        _ = jlink.flash_file(**kwargs)
        print('Flashed device successfully.')