class_docstr: Optimizer implementing SGD.
code: def apply_grad(self, grad, var):
      if grad is None:
          tf.logging.warning(
              "Gradient is None for variable %s", var.name
          )
          return []
      # It is critical to use assign_sub instead of mtf.assign(var - ...)
      #  for the case of bfloat16 activations, so as to avoid repeatedly rounding
      #  the slice value, which results in poor quality.
      return [mtf.assign_sub(var, grad * self.lr)]
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import functools
  import re
  import gin
  from mesh_tensorflow import layers
  from mesh_tensorflow import ops_with_redefined_builtins
  import tensorflow.compat.v1
label_desc: Use image node_id 3 for calling the SgdOptimizer obj's underlying member method code with example usage: obj.apply_grad(grad, var) and returns: list, list