code: def _testTypesForSparseFtrlMultiplyLinearByLr(
      self, x, y, z, lr, grad, indices, l1=0.0, l2=0.0, lr_power=-0.5
  ):
      self.setUp()
      with self.session(use_gpu=False):
          var = variable_v1.VariableV1(x)
          accum = variable_v1.VariableV1(y)
          linear = variable_v1.VariableV1(z)
          self.evaluate(variables.global_variables_initializer())
  
          self.assertAllCloseAccordingToType(x, self.evaluate(var))
          sparse_apply_ftrl = gen_training_ops.sparse_apply_ftrl(
              var,
              accum,
              linear,
              grad,
              constant_op.constant(
                  indices, self._toType(indices.dtype)
              ),
              lr,
              l1,
              l2,
              lr_power=lr_power,
              multiply_linear_by_lr=True,
          )
          out = self.evaluate(sparse_apply_ftrl)
          self.assertShapeEqual(out, sparse_apply_ftrl)
  
          for i, index in enumerate(indices):
              self.assertAllCloseAccordingToType(
                  x[index]
                  - lr
                  * grad[i]
                  * (y[index] + grad[i] * grad[i]) ** (lr_power),
                  self.evaluate(var)[index],
              )
              self.assertAllCloseAccordingToType(
                  y[index] + grad[i] * grad[i],
                  self.evaluate(accum)[index],
              )
  
imports: import itertools
  import threading
  import numpy
  from tensorflow.python.eager import def_function
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import test_util
  from tensorflow.python.framework.test_util import TensorFlowTestCase
  from tensorflow.python.ops import gen_training_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import resource_variable_ops
  from tensorflow.python.ops import variable_v1
  from tensorflow.python.ops import variables
  from tensorflow.python.platform import googletest
label_desc: Use image node_id 12 for calling the TrainingOpsTest obj's underlying member method code with example usage: obj._testTypesForSparseFtrlMultiplyLinearByLr(x, y, z, lr, grad, indices, l1, l2, lr_power) without return types