from tensorflow.python.training import gradient_descent

    with self._maybeWithDevice("/job:worker" if is_distributed else None):
      grads = ops.IndexedSlices(
          constant_op.constant(
              [[0.1, 0.1], [0.1, 0.1]], dtype=dtype), [0, 2], [3, 2])
      sgd = gradient_descent.GradientDescentOptimizer(3.0)
      clip_opt = variable_clipping_optimizer.VariableClippingOptimizer(
          sgd, {var0: [1],
                var1: [0]}, 2.0)
