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