def leaf_asts(self):
seen = set()<EOL>ast_queue = deque([self])<EOL>while ast_queue:<EOL><INDENT>ast = ast_queue.pop()<EOL>if isinstance(ast, Base) and id(ast.cache_key) not in seen:<EOL><INDENT>seen.add(id(ast.cache_key))<EOL>if ast.depth == <NUM_LIT:1>:<EOL><INDENT>yield ast<EOL>continue<EOL><DEDENT>ast_queue.extend(ast.args)<EOL>continue<EOL><DEDENT><DEDENT>
Return an iterator over the leaf ASTs.