def execute(self, commands, pretty_format=False):
tree = parser.parseString(commands)<EOL>self.consumed_capacities = []<EOL>self._analyzing = False<EOL>self._query_rate_limit = None<EOL>for statement in tree:<EOL><INDENT>try:<EOL><INDENT>result = self._run(statement)<EOL><DEDENT>except ExplainSignal:<EOL><INDENT>return self._format_explain()<EOL><DEDENT><DEDENT>if pretty_format:<EOL><INDENT>return self._pretty_format(tree[-<NUM_LIT:1>], result)<EOL><DEDENT>return result<EOL>
Parse and run a DQL string

Parameters
----------
commands : str
    The DQL command string
pretty_format : bool
    Pretty-format the return value. (e.g. 4 -> 'Updated 4 items')