input: 
  from Crypto.Cipher import AES
  
  key = b'Sixteen byte key'
  
  def encrypt_decrypt_aes(plaintext: str, mode: str) -> str:
      """ This function encrypts or decrypts a given plaintext string using AES encryption.
      The mode is expected to be either 'encrypt' or 'decrypt'.
      
      >>> encrypt_decrypt_aes("Hello World", 'encrypt')
      b'\xb3"\xf1J\x1c\xe2\xe8{\xe4\\\xec*\xb9#T\xf2\xf2'
      >>> encrypt_decrypt_aes(b'\xb3"\xf1J\x1c\xe2\xe8{\xe4\\\xec*\xb9#T\xf2\xf2', 'decrypt')
      b'Hello World'
      """
      cipher = AES.new(key, AES.MODE_ECB)
      if mode == 'encrypt':
          return cipher.encrypt(plaintext)
      elif mode == 'decrypt':
          return cipher.decrypt(ciphertext)
  
output:     cipher = AES.new(key, AES.MODE_ECB)
      if mode == 'encrypt':
          return cipher.encrypt(plaintext.encode())
      elif mode == 'decrypt':
          return cipher.decrypt(plaintext)