<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def reboot(self, devices):
 """Reboot one or more devices. """

        for device in devices:
            self.logger.info('Rebooting: %s', device.id)
            try:
                device.reboot()
            except packet.baseapi.Error:
                raise PacketManagerException('Unable to reboot instance "{}"'.format(device.id))