input: 
  from Crypto.Cipher import AES
  
  key = b'Sixteen byte key'
  
  def encrypt_decrypt_string(action, input_string):
      """ Encrypts or decrypts a string using the AES algorithm in ECB mode.
      The action parameter should be either 'encrypt' or 'decrypt'.
  
      Example:
      >>> encrypt_decrypt_string('encrypt', b'Hello, world!')
      b'\x1e\x01\xa4\xf9\xd7\xc2\xa6u\xa3\xfa\xf1\x1c\xbfF9\xf5'
      >>> encrypt_decrypt_string('decrypt', b'\x1e\x01\xa4\xf9\xd7\xc2\xa6u\xa3\xfa\xf1\x1c\xbfF9\xf5')
      b'Hello, world!'
      """
      cipher = AES.new(key, AES.MODE_ECB)
      if action == 'encrypt':
          return cipher.encrypt(input_string)
      elif action == 'decrypt':
          return cipher.decrypt(input_string)
      else:
          raise ValueError("Invalid action. Should be either 'encrypt' or 'decrypt'.")
  
output:     cipher = AES.new(key, AES.MODE_ECB)
      if action == 'encrypt':
          return cipher.encrypt(input_string)
      elif action == 'decrypt':
          return cipher.decrypt(input_string)
      else:
          raise ValueError("Invalid action. Should be either 'encrypt' or 'decrypt'.")