code: def testSparse(self):
      if self.primary_device in ("GPU", "TPU"):
          self.skipTest(
              "IndexedSlices not supported on {}.".format(
                  self.primary_device
              )
          )
  
      parameters = [
          tf.Variable([[1.0], [2.0]]),
          tf.Variable([[3.0], [4.0]]),
      ]
      updates = [
          tf.IndexedSlices(
              tf.constant([0.1], shape=[1, 1]),
              tf.constant([0]),
              tf.constant([2, 1]),
          ),
          tf.IndexedSlices(
              tf.constant([0.01], shape=[1, 1]),
              tf.constant([1]),
              tf.constant([2, 1]),
          ),
      ]
      optimizer = self.make_optimizer(learning_rate=3.0)
      # Step 1 of RMSProp
      optimizer.apply(updates, parameters)
      self.assertAllClose(
          [[-8.486831], [2.0]], parameters[0].numpy(), rtol=1e-4
      )
      self.assertAllClose(
          [[3.0], [-5.486784]], parameters[1].numpy(), rtol=1e-4
      )
      # Step 2 of RMSProp
      optimizer.apply(updates, parameters)
      self.assertAllClose(
          [[-15.369301], [2.0]], parameters[0].numpy(), rtol=1e-4
      )
      self.assertAllClose(
          [[3.0], [-12.369237]], parameters[1].numpy(), rtol=1e-4
      )
      # Step 3 of RMSProp
      optimizer.apply(updates, parameters)
      self.assertAllClose(
          [[-21.132141], [2.0]], parameters[0].numpy(), rtol=1e-4
      )
      self.assertAllClose(
          [[3.0], [-18.132067]], parameters[1].numpy(), rtol=1e-4
      )
  
imports: from sonnet.src import test_utils
  from sonnet.src.optimizers import optimizer_tests
  from sonnet.src.optimizers import rmsprop
  import tensorflow
label_desc: Use image node_id 4 for calling the RMSPropTest obj's underlying member method code with example usage: obj.testSparse() without return types