def get_source_line(node):
 while node:
  if (node.source or node.line):
   return (node.source, node.line)
  node = node.parent
 return (None, None)

def get_source_line ( node ) : while node : if ( node . source or node . line ) : return ( node . source , node . line ) node = node . parent return ( None , None )
return the "source" and "line" attributes from the node given or from its closest ancestor .