def fgraph_updated_vars(fgraph, expanded_inputs):
 updated_vars = {}
 potential_values = list(fgraph.outputs)
 if (len(expanded_inputs) != len(fgraph.inputs)):
  raise ValueError('expanded_inputs must match len(fgraph.inputs)')
 for (e_input, ivar) in reversed(list(zip(expanded_inputs, fgraph.inputs))):
  if (e_input.update is not None):
   updated_vars[ivar] = potential_values.pop()
 return updated_vars

def fgraph_updated_vars ( fgraph , expanded_inputs ) : updated_vars = { } potential_values = list ( fgraph . outputs ) if ( len ( expanded_inputs ) != len ( fgraph . inputs ) ) : raise ValueError ( 'expanded_inputs must match len(fgraph.inputs)' ) for ( e_input , ivar ) in reversed ( list ( zip ( expanded_inputs , fgraph . inputs ) ) ) : if ( e_input . update is not None ) : updated_vars [ ivar ] = potential_values . pop ( ) return updated_vars
reconstruct the full "updates" dictionary .