class_docstr: Most tests done in the base class LinearOperatorDerivedClassTest.
class_docstr_tok: ["Most","tests","done","in","the","base","class","LinearOperatorDerivedClassTest","."]
code: def test_composite_gradients(self):
      with backprop.GradientTape() as tape:
          op1 = linalg.LinearOperatorFullMatrix(
              [[1.0, 0.0], [0.0, 1.0]], is_non_singular=True
          )
          op2 = linalg.LinearOperatorFullMatrix(
              [[2.0, 0.0], [0.0, 2.0]], is_non_singular=True
          )
          tape.watch([op1, op2])
          operator = kronecker.LinearOperatorKronecker(
              [op1, op2], is_non_singular=True
          )
  
          x = self.make_x(op1, adjoint=False)
          y = op1.matmul(x)
          (
              connected_grad,
              disconnected_grad,
              composite_grad,
          ) = tape.gradient(y, [op1, op2, operator])
  
      disconnected_component_grad = composite_grad.operators[
          1
      ].to_dense()
      self.assertAllClose(
          connected_grad.to_dense(),
          composite_grad.operators[0].to_dense(),
      )
      self.assertAllClose(
          disconnected_component_grad,
          array_ops.zeros_like(disconnected_component_grad),
      )
      self.assertIsNone(disconnected_grad)
  
imports: import numpy
  from tensorflow.python.eager import backprop
  from tensorflow.python.framework import config
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import variables
  from tensorflow.python.ops.linalg import linalg
  from tensorflow.python.ops.linalg import linear_operator_kronecker
  from tensorflow.python.ops.linalg import linear_operator_lower_triangular
  from tensorflow.python.ops.linalg import linear_operator_test_util
  from tensorflow.python.ops.linalg import linear_operator_util
  from tensorflow.python.platform import test
label_desc: Use image node_id 15 for calling the SquareLinearOperatorKroneckerTest obj's underlying member method code with example usage: obj.test_composite_gradients() without return types