'Process the symbolic gradients.
Args:
grads (list): list of (grad, var).
Returns:
list: processed gradients, with the same type as input.'

def process(self, grads):

    if (self._name_scope is None):
        with tf.name_scope(type(self).__name__) as scope:
            self._name_scope = scope
            return self._process(grads)
    else:
        with tf.name_scope(self._name_scope):
            return self._process(grads)
