|View source on GitHub|
Removes any called lambdas and blocks from
tff.framework.remove_lambdas_and_blocks( comp )
This function will rename all the variables in
comp in a single walk of the
AST, then replace called lambdas with blocks in another walk, since this
transformation interacts with scope in delicate ways. It will chain inlining
the blocks and collapsing the selection-from-tuple pattern together into a
comp: Instance of
building_blocks.ComputationBuildingBlockfrom which we want to remove called lambdas and blocks.
A transformed version of
comp which has no called lambdas or blocks, and
no extraneous selections from tuples.