code: def test_chained_error():
      try:
          try:
              print(1 / 0)
          except Exception as e:
              raise SacredError("Something bad happened") from e
      except SacredError as e:
          st = format_sacred_error(e, "usage")
          assert re.match(
              r"Traceback \(most recent calls WITHOUT Sacred internals\):\s+File "
              + r"\"[^\"]+?test_exceptions.py\", line \d+, in test_chained_error\s+"
              + r"print\(1 / 0\)\n(\s+~~\^~~\s+)?ZeroDivisionError: division by zero\n\n"
              + r"The above exception was the direct cause of the following exception:\n"
              + r"\nTraceback \(most recent calls WITHOUT Sacred internals\):\s+File "
              + r"\"[^\"]+?test_exceptions.py\", line \d+, in test_chained_error\s+raise "
              + r"SacredError\(\"Something bad happened\"\) from e\nsacred.utils."
              + r"SacredError: Something bad happened\n",
              st,
              re.MULTILINE,
          )
  
file_path: sacred/tests/test_exceptions.py
imports: import re
  from sacred import Ingredient, Experiment
  from sacred.utils import CircularDependencyError, ConfigAddedError, MissingConfigError, NamedConfigNotFoundError, format_filtered_stacktrace, format_sacred_error, SacredError
  import pytest
label_desc: Use image node_id 8 for calling a global function with example usage: test_chained_error() without return types