def tf_optimization(self, states, internals, actions, terminal, reward, next_states=None, next_internals=None):
arguments = self.optimizer_arguments(<EOL>states=states,<EOL>internals=internals,<EOL>actions=actions,<EOL>terminal=terminal,<EOL>reward=reward,<EOL>next_states=next_states,<EOL>next_internals=next_internals<EOL>)<EOL>return self.optimizer.minimize(**arguments)<EOL>
Creates the TensorFlow operations for performing an optimization update step based
on the given input states and actions batch.

Args:
    states: Dict of state tensors.
    internals: List of prior internal state tensors.
    actions: Dict of action tensors.
    terminal: Terminal boolean tensor.
    reward: Reward tensor.
    next_states: Dict of successor state tensors.
    next_internals: List of posterior internal state tensors.

Returns:
    The optimization operation.