class_docstr: An optimizer which applies some "post-processing operation" per variable
  (e.g. clipping, quantization) after the gradient update.
class_docstr_tok: ["An","optimizer","which","applies","some","``","post-processing","operation","''","per","variable","(","e.g",".","clipping",",","quantization",")","after","the","gradient","update","."]
code: def _maybe_colocate(self, var):
      G = tf.get_default_graph()
      if self._colocate and get_tf_version_tuple() <= (1, 12):
          with G.colocate_with(var):
              yield
      else:
          yield
  
imports: from contextlib import contextmanager
  import tensorflow
  from ..tfutils.common import get_tf_version_tuple
  from ..compat import tfv1
  from ..utils.develop import HIDE_DOC
  from .gradproc import FilterNoneGrad, GradientProcessor
label_desc: Use image node_id 3 for calling the PostProcessOptimizer obj's underlying member method code with example usage: obj._maybe_colocate(var) without return types