def _apply_forwards_to_bindings(forward, bindings):
 for (var, value) in bindings.items():
  while (id(value) in forward):
   value = forward[id(value)]
  bindings[var] = value

def _apply_forwards_to_bindings ( forward , bindings ) : for ( var , value ) in bindings . items ( ) : while ( id ( value ) in forward ) : value = forward [ id ( value ) ] bindings [ var ] = value
replace any feature structure that has a forward pointer with the target of its forward pointer .