code: def test_cause_chain(self, filter_mode):
      @jit
      def inner(x):
          raise ValueError("inner")
  
      @jit
      def outer(x):
          try:
              inner(x)
          except ValueError as e:
              raise TypeError("outer") from e
  
      f = lambda: outer(1.0)
  
      check_filtered_stack_trace(
          self,
          TypeError,
          f,
          [
              ("<lambda>", "f = lambda: outer"),
              ("outer", "raise TypeError"),
          ],
          filter_mode=filter_mode,
      )
      e = get_exception(
          TypeError, f
      )  # Uses the default JAX_TRACEBACK_FILTERING=auto
      if sys.version_info >= (3, 11):
          assert any("For simplicity" in x for x in e.__notes__)
          self.assertIsInstance(e.__cause__, ValueError)
      else:
          self.assertIsInstance(
              e.__cause__, jax.errors.SimplifiedTraceback
          )
          self.assertIsInstance(e.__cause__.__cause__, ValueError)
  
imports: import re
  import sys
  import traceback
  from absl.testing import absltest
  from absl.testing import parameterized
  import jax
  import jax.numpy
  from jax import grad, jit, vmap, lax
  from jax._src import config
  from jax._src import core
  from jax._src import source_info_util
  from jax._src import test_util
  from jax._src import traceback_util
label_desc: Use image node_id 15 for calling the FilteredTracebackTest obj's underlying member method code with example usage: obj.test_cause_chain(filter_mode) without return types