input: Write a function to create an application in Python for encryption and decryption of strings. The application should take a string as input, and use AES encryption algorithm to encrypt the string. If decryption is needed, it should use the same AES algorithm to decrypt the ciphertext. If the input string is empty, return an empty string in both encryption and decryption.
  from Crypto.Cipher import AES
  
  key = b'Sixteen byte key'
  
  def encrypt_decrypt(string, mode):
      cipher = AES.new(key, AES.MODE_ECB)
      if mode == "encrypt":
          return cipher.encrypt(string) if string else ""
      elif mode == "decrypt":
          return cipher.decrypt(string) if string else ""
      return ""
  
  assert encrypt_decrypt(b'secret message', "encrypt")==b'I\xe2\xc3\x83\xc2'\xe2\xc2\x87*\xc0xc\xda\xe2\xc2\xafW\xc3kc\x04e\xdf1B\xc3ED4\xe26g'
  assert encrypt_decrypt(b'I\xe2\xc3\x83\xc2'\xe2\xc2\x87*\xc0xc\xda\xe2\xc2\xafW\xc3kc\x04e\xdf1B\xc3ED4\xe26g', "decrypt")==b'secret message'
  assert encrypt_decrypt(b'', "encrypt")==b''
  assert encrypt_decrypt(b'', "decrypt")==b''
output: 
  from Crypto.Cipher import AES
  
  key = b'Sixteen byte key'
  
  def encrypt_decrypt(string, mode):
      cipher = AES.new(key, AES.MODE_ECB)
      if mode == "encrypt":
          return cipher.encrypt(string) if string else ""
      elif mode == "decrypt":
          return cipher.decrypt(string) if string else ""
      return ""
  