code: def preorder_iter_with_position(expression):
      
      yield expression, ()
      if isinstance(expression, Operation):
          for i, operand in enumerate(op_iter(expression)):
              for child, pos in preorder_iter_with_position(operand):
                  yield child, (i, ) + pos
docs: Iterate over the expression in preorder.
  
      Also yields the position of each subexpression.