code: def decrypt(payload, private_key):
          
          cipher = PKCS1_v1_5.new(private_key)
          aes_key_str = cipher.decrypt(b64decode(payload.get("aes_key")), sentinel=None)
          aes_key = json.loads(aes_key_str.decode("utf-8"))
          key = b64decode(aes_key.get("key"))
          iv = b64decode(aes_key.get("iv"))
          encrypted_magic_envelope = b64decode(payload.get("encrypted_magic_envelope"))
          encrypter = AES.new(key, AES.MODE_CBC, iv)
          content = encrypter.decrypt(encrypted_magic_envelope)
          return etree.fromstring(pkcs7_unpad(content))
docs: Decrypt an encrypted JSON payload and return the Magic Envelope document inside.