<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def config(self, configlet, plane, **attributes):
 """Apply config to the device."""

        try:
            config_text = configlet.format(**attributes)
        except KeyError as exp:
            raise CommandSyntaxError("Configuration template error: {}".format(str(exp)))

        return self.driver.config(config_text, plane)