class_docstr: Optimizer for Tensors rather than tf.Variables.
  
  TensorOptimizers implement optimizers where the values being optimized
  are ordinary Tensors, rather than Variables. TF Variables can have strange
  behaviors when being assigned multiple times within a single sess.run()
  call, particularly in Distributed TF, so this avoids thinking about those
  issues. These are helper classes for the `projected_optimization`
  method. Apart from not using Variables, they follow an interface very
  similar to tf.Optimizer.
docstr: Given a gradient, make one optimization step.
  
  :param grads: list of tensors, same length as `x`, containing the corresponding gradients
  :param x: list of tensors to update
  :param optim_state: dict
  
  Returns:
    new_x: list of tensors, updated version of `x`
    new_optim_state: dict, updated version of `optim_state`
docstr_tok: ["Given","a","gradient",",","make","one","optimization","step",".",":","param","grads",":","list","of","tensors",",","same","length","as","`","x","`",",","containing","the","corresponding","gradients",":","param","x",":","list","of","tensors","to","update",":","param","optim_state",":","dict","Returns",":","new_x",":","list","of","tensors",",","updated","version","of","`","x","`","new_optim_state",":","dict",",","updated","version","of","`","optim_state","`"]
code: def _apply_gradients(self, grads, x, optim_state):
      """
      Given a gradient, make one optimization step.
  
      :param grads: list of tensors, same length as `x`, containing the corresponding gradients
      :param x: list of tensors to update
      :param optim_state: dict
  
      Returns:
        new_x: list of tensors, updated version of `x`
        new_optim_state: dict, updated version of `optim_state`
      """
      raise NotImplementedError(
          "_apply_gradients should be defined in each subclass"
      )
  
imports: import warnings
  import numpy
  from six.moves import xrange
  import tensorflow
  import tensorflow_addons
  from cleverhans.attacks.attack import Attack
  from cleverhans.compat import reduce_mean, reduce_sum, reduce_max
  from cleverhans.model import Model
  from cleverhans import utils_tf
label_desc: Use image node_id 2 for calling the TensorOptimizer obj's underlying member method code with example usage: obj._apply_gradients(grads, x, optim_state) without return types