input: from Crypto.Cipher import AES
  
  key = b'Sixteen byte key'
  
  def encrypt_decrypt(mode: str, text: str) -> str:
      """Encrypts or decrypts a given string using AES encryption in ECB mode.
      The mode can be either 'encrypt' or 'decrypt'.
      >>> encrypt_decrypt('encrypt', 'Hello World')
      b'l\xe2\x97>#R]\xf9\xfbC~\x03L*'
      >>> encrypt_decrypt('decrypt', b'l\xe2\x97>#R]\xf9\xfbC~\x03L*')
      'Hello World'
      """
      if mode == 'encrypt':
          cipher = AES.new(key, AES.MODE_ECB)
          return cipher.encrypt(text.encode('utf-8'))
      elif mode == 'decrypt':
          cipher = AES.new(key, AES.MODE_ECB)
          return cipher.decrypt(text).decode('utf-8')
      else:
          raise ValueError("Mode must be 'encrypt' or 'decrypt'")
output:     if mode == 'encrypt':
          cipher = AES.new(key, AES.MODE_ECB)
          return cipher.encrypt(text.encode('utf-8'))
      elif mode == 'decrypt':
          cipher = AES.new(key, AES.MODE_ECB)
          return cipher.decrypt(text).decode('utf-8')
      else:
          raise ValueError("Mode must be 'encrypt' or 'decrypt'")