<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):
 """Runs the license command. Args: self (LicenseCommand):
 the ``LicenseCommand`` instance args (Namespace):
 the arguments passed on the command-line Returns: ``None`` """

        jlink = self.create_jlink(args)
        if args.list:
            print('Built-in Licenses: %s' % ', '.join(jlink.licenses.split(',')))
            print('Custom Licenses: %s' % ', '.join(jlink.custom_licenses.split(',')))
        elif args.add is not None:
            if jlink.add_license(args.add):
                print('Successfully added license.')
            else:
                print('License already exists.')
        elif args.erase:
            if jlink.erase_licenses():
                print('Successfully erased all custom licenses.')
            else:
                print('Failed to erase custom licenses.')