class_docstr: Test that the order of addition is done as specified by tiers.
class_docstr_tok: ["Test","that","the","order","of","addition","is","done","as","specified","by","tiers","."]
code: def test_tier_1_additions_done_by_tier_1_with_order_flipped(self):
      diag1 = linalg.LinearOperatorDiag([1.0])
      diag2 = linalg.LinearOperatorDiag([1.0])
      tril = linalg.LinearOperatorLowerTriangular([[1.0]])
      addition_tiers = [
          [linear_operator_addition._AddAndReturnTriL()],
          [linear_operator_addition._AddAndReturnDiag()],
          [_BadAdder()],
      ]
      # Tier 0 could convert to TriL, and this converted everything to TriL,
      # including the Diags.
      # Tier 1 was never used.
      # Tier 2 was never used (therefore, _BadAdder didn't raise).
      op_sum = add_operators(
          [diag1, diag2, tril], addition_tiers=addition_tiers
      )
      self.assertEqual(1, len(op_sum))
      self.assertIsInstance(
          op_sum[0], linalg.LinearOperatorLowerTriangular
      )
  
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 3 for calling the LinearOperatorOrderOfAdditionTest obj's underlying member method code with example usage: obj.test_tier_1_additions_done_by_tier_1_with_order_flipped() without return types