human
Complete this python program:
def decrypt_aes(ciphertext, key):
assistant
#Here is the Python program you requested.

    """Decrypts a ciphertext that was AES-encrypted with the given key.
    The function expects the ciphertext as a byte string and it returns the
    decrypted message as a byte string.
    """
    from Crypto.Cipher import AES
    def unpad(s):
        return s[:(- ord(s[(-1)]))]
    iv = ciphertext[:AES.block_size]
    cipher = AES.new(key, AES.MODE_CBC, iv)
    plaintext = unpad(cipher.decrypt(ciphertext))[AES.block_size:]
    return plaintext