#NEWLINE# def path( a , b ) : #NEWLINE# #INDENT# " A path of nodes from a to b\n\n    >>> from blaze.expr import symbol\n    >>> t = symbol('t', 'var * {name: string, amount: int, id: int}')\n    >>> expr = t.amount.sum()\n    >>> list(path(expr, t))\n    [sum(t.amount), t.amount, <`t` symbol; dshape='...'>]\n    " #NEWLINE# while ( not a . isidentical ( b ) ) : #NEWLINE# #INDENT# ( yield a ) #NEWLINE# if ( not a . _inputs ) : #NEWLINE# #INDENT# break #NEWLINE# #UNINDENT# for child in a . _inputs : #NEWLINE# #INDENT# if any ( ( b . isidentical ( node ) for node in child . _traverse ( ) ) ) : #NEWLINE# #INDENT# a = node #NEWLINE# break #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# ( yield a )