def _extract_expressions(node):
 if (isinstance(node, nodes.CallFunc) and isinstance(node.func, nodes.Name) and (node.func.name == _TRANSIENT_FUNCTION)):
  real_expr = node.args[0]
  real_expr.parent = node.parent
  for name in node.parent._astroid_fields:
   child = getattr(node.parent, name)
   if isinstance(child, (list, tuple)):
    for (idx, compound_child) in enumerate(child):
     if (compound_child is node):
      child[idx] = real_expr
   elif (child is node):
    setattr(node.parent, name, real_expr)
  (yield real_expr)
 else:
  for child in node.get_children():
   for result in _extract_expressions(child):
    (yield result)

def _extract_expressions ( node ) : if ( isinstance ( node , nodes . CallFunc ) and isinstance ( node . func , nodes . Name ) and ( node . func . name == _TRANSIENT_FUNCTION ) ) : real_expr = node . args [ 0 ] real_expr . parent = node . parent for name in node . parent . _astroid_fields : child = getattr ( node . parent , name ) if isinstance ( child , ( list , tuple ) ) : for ( idx , compound_child ) in enumerate ( child ) : if ( compound_child is node ) : child [ idx ] = real_expr elif ( child is node ) : setattr ( node . parent , name , real_expr ) ( yield real_expr ) else : for child in node . get_children ( ) : for result in _extract_expressions ( child ) : ( yield result )
find expressions in a call to _transient_function and extract them .