input: 
  from Crypto.Cipher import AES
  
  key = b'Sixteen byte key'
  
  def string_encryption_decryption(operation: str, text: str) -> str:
      """
      Perform encryption or decryption of a given string using AES encryption in ECB mode.
      
      >>> string_encryption_decryption('encrypt', 'Hello World')
      b'\\\x1a\xebug0\x80\xe4\x87o\x10//~\xe3'
      >>> string_encryption_decryption('decrypt', b'\\\x1a\xebug0\x80\xe4\x87o\x10//~\xe3')
      b'Hello World'
      """
      if operation == 'encrypt':
          cipher = AES.new(key, AES.MODE_ECB)
          return cipher.encrypt(text.encode())
      elif operation == 'decrypt':
          cipher = AES.new(key, AES.MODE_ECB)
          return cipher.decrypt(text).decode()
      else:
          raise ValueError("Invalid operation. Choose either 'encrypt' or 'decrypt'.")
  
output:     if operation == 'encrypt':
          cipher = AES.new(key, AES.MODE_ECB)
          return cipher.encrypt(text.encode())
      elif operation == 'decrypt':
          cipher = AES.new(key, AES.MODE_ECB)
          return cipher.decrypt(text).decode()
      else:
          raise ValueError("Invalid operation. Choose either 'encrypt' or 'decrypt'.")