code: def test_identity_plus_identity_returns_diag(self):
      id1 = linalg.LinearOperatorIdentity(num_rows=2)
      id2 = linalg.LinearOperatorIdentity(num_rows=2, batch_shape=[3])
      hints = linear_operator_addition._Hints(
          is_positive_definite=True, is_non_singular=True
      )
  
      self.assertTrue(self._adder.can_add(id1, id2))
      operator = self._adder.add(id1, id2, "my_operator", hints)
      self.assertIsInstance(operator, linalg.LinearOperatorDiag)
  
      with self.cached_session():
          self.assertAllClose(
              2 * linalg_ops.eye(num_rows=2, batch_shape=[3]),
              operator.to_dense(),
          )
      self.assertTrue(operator.is_positive_definite)
      self.assertTrue(operator.is_non_singular)
      self.assertEqual("my_operator", operator.name)
  
imports: import numpy
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import linalg_ops
  from tensorflow.python.ops.linalg import linalg
  from tensorflow.python.ops.linalg import linear_operator_addition
  from tensorflow.python.platform import test
label_desc: Use image node_id 2 for calling the AddAndReturnDiagTest obj's underlying member method code with example usage: obj.test_identity_plus_identity_returns_diag() without return types