def tf_step(self, time, variables, **kwargs):
global_variables = kwargs["<STR_LIT>"]<EOL>assert all(<EOL>util.shape(global_variable) == util.shape(local_variable)<EOL>for global_variable, local_variable in zip(global_variables, variables)<EOL>)<EOL>local_deltas = self.optimizer.step(time=time, variables=variables, **kwargs)<EOL>with tf.control_dependencies(control_inputs=local_deltas):<EOL><INDENT>applied = self.optimizer.apply_step(variables=global_variables, deltas=local_deltas)<EOL><DEDENT>with tf.control_dependencies(control_inputs=(applied,)):<EOL><INDENT>update_deltas = list()<EOL>for global_variable, local_variable in zip(global_variables, variables):<EOL><INDENT>delta = global_variable - local_variable<EOL>update_deltas.append(delta)<EOL><DEDENT>applied = self.apply_step(variables=variables, deltas=update_deltas)<EOL><DEDENT>with tf.control_dependencies(control_inputs=(applied,)):<EOL><INDENT>return [local_delta + update_delta for local_delta, update_delta in zip(local_deltas, update_deltas)]<EOL><DEDENT>
Keyword Args:
    global_variables: List of global variables to apply the proposed optimization step to.

Returns:
    List of delta tensors corresponding to the updates for each optimized variable.