def run(self, dag):
resets = dag.op_nodes(Reset)<EOL>for reset in resets:<EOL><INDENT>predecessor = next(dag.predecessors(reset))<EOL>if predecessor.type == '<STR_LIT>':<EOL><INDENT>dag.remove_op_node(reset)<EOL><DEDENT><DEDENT>return dag<EOL>
Return a new circuit that has been optimized.