<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def attach_volume_to_device(self, volume_id, device_id):
 """Attaches the created Volume to a Device. """

        try:
            volume = self.manager.get_volume(volume_id)
            volume.attach(device_id)
        except packet.baseapi.Error as msg:
            raise PacketManagerException(msg)
        return volume