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

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