input: 
  def encrypt_decrypt_string(input_string: str, mode: str) -> str:
      """Encrypts or decrypts a given string using AES encryption algorithm.
      If mode is 'encrypt', the function will encrypt the input string.
      If mode is 'decrypt', the function will decrypt the input string.
      >>> encrypt_decrypt_string('Hello, World!', 'encrypt')
      b'\xf6\xb9\xfb\xab\xa5J(\xcf\x02j\x90w1\xae\x9a\xba'
      >>> encrypt_decrypt_string(b'\xf6\xb9\xfb\xab\xa5J(\xcf\x02j\x90w1\xae\x9a\xba', 'decrypt')
      'Hello, World!'
      """
      key = b'Sixteen byte key'
      cipher = AES.new(key, AES.MODE_ECB)
      
      if mode == 'encrypt':
          return cipher.encrypt(input_string)
      elif mode == 'decrypt':
          return cipher.decrypt(input_string).decode('utf-8')
      else:
          raise ValueError("Invalid mode. Use 'encrypt' or 'decrypt'.")
  
output:     from Crypto.Cipher import AES
      import base64
  
      def pad(s):
          return s + (AES.block_size - len(s) % AES.block_size) * chr(AES.block_size - len(s) % AES.block_size)
  
      def unpad(s):
          return s[:-ord(s[len(s)-1:])]
  
      if mode == 'encrypt':
          input_string = pad(input_string).encode('utf-8')
          return base64.b64encode(cipher.encrypt(input_string))
      elif mode == 'decrypt':
          input_string = base64.b64decode(input_string)
          return unpad(cipher.decrypt(input_string)).decode('utf-8')