code: def test_function_exception(
      telemetry_reporter: TelemetryReporter,
  ) -> None:  # noqa: D
      with pytest.raises(ValueError):
  
          @log_call(
              telemetry_reporter=telemetry_reporter,
              module_name=__name__,
          )
          def test_function() -> str:
              raise ValueError("foo")
  
          test_function()
  
      start_event = telemetry_reporter.test_handler.payloads[
          0
      ].function_start_events[0]
      assert (
          start_event.module_name
          == "metricflow.test.telemetry.test_telemetry"
      )
      assert start_event.function_name == "test_function"
  
      end_event = telemetry_reporter.test_handler.payloads[
          1
      ].function_end_events[0]
      assert (
          end_event.module_name
          == "metricflow.test.telemetry.test_telemetry"
      )
      assert end_event.function_name == "test_function"
      assert end_event.exception_trace
      assert (
          end_event.exception_trace.find(
              "Traceback (most recent call last):"
          )
          != -1
      )
      assert end_event.exception_trace.find("ValueError: foo") != -1
      assert end_event.runtime > 0
  
file_path: metricflow/metricflow/test/telemetry/test_telemetry.py
imports: from __future__ import annotations
  import logging
  import pytest
  from metricflow.telemetry.models import TelemetryLevel
  from metricflow.telemetry.reporter import TelemetryReporter, log_call
label_desc: Use image node_id 3 for calling a global function with example usage: test_function_exception(telemetry_reporter) without return types