def __query_assertion(self, xpath_expr):
assertion_expr = '<STR_LIT>'<EOL>signature_expr = '<STR_LIT>'<EOL>signed_assertion_query = '<STR_LIT>' + assertion_expr + signature_expr<EOL>assertion_reference_nodes = self.__query(signed_assertion_query)<EOL>tagid = None<EOL>if not assertion_reference_nodes:<EOL><INDENT>signed_message_query = '<STR_LIT>' + signature_expr<EOL>message_reference_nodes = self.__query(signed_message_query)<EOL>if message_reference_nodes:<EOL><INDENT>message_id = message_reference_nodes[<NUM_LIT:0>].get('<STR_LIT>')<EOL>final_query = "<STR_LIT>"<EOL>tagid = message_id[<NUM_LIT:1>:]<EOL><DEDENT>else:<EOL><INDENT>final_query = "<STR_LIT>"<EOL><DEDENT>final_query += assertion_expr<EOL><DEDENT>else:<EOL><INDENT>assertion_id = assertion_reference_nodes[<NUM_LIT:0>].get('<STR_LIT>')<EOL>final_query = '<STR_LIT>' + assertion_expr + "<STR_LIT>"<EOL>tagid = assertion_id[<NUM_LIT:1>:]<EOL><DEDENT>final_query += xpath_expr<EOL>return self.__query(final_query, tagid)<EOL>
Extracts nodes that match the query from the Assertion

:param query: Xpath Expresion
:type query: String

:returns: The queried nodes
:rtype: list