<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def write_device_config(self, device_config):
 """ Write a DEVICE_CONFIG to the YubiKey NEO. """

        if not self.capabilities.have_usb_mode(device_config._mode):
            raise yubikey_base.YubiKeyVersionError("USB mode: %02x not supported for %s" % (device_config._mode, self))
        return self._device._write_config(device_config, SLOT.DEVICE_CONFIG)