code: def test_caused_exception():
      console = Console(width=100, file=io.StringIO())
      value_error_message = "ValueError caused by ZeroDivisionError"
  
      try:
          try:
              1 / 0
          except ZeroDivisionError as e:
              raise ValueError(value_error_message) from e
      except Exception:
          console.print_exception()
      exception_text = console.file.getvalue()
  
      text_should_contain = [
          value_error_message,
          "ZeroDivisionError",
          "ValueError",
          "The above exception was the direct cause",
      ]
  
      for msg in text_should_contain:
          assert msg in exception_text
  
      # ZeroDivisionError should come before ValueError
      assert exception_text.find(
          "ZeroDivisionError"
      ) < exception_text.find("ValueError")
  
imports: import io
  import re
  import sys
  from typing import List
  import pytest
  from rich.console import Console
  from rich.theme import Theme
  from rich.traceback import Traceback, install
label_desc: Use image node_id 11 for calling a global function with example usage: test_caused_exception() without return types