code: def test_shorten_traceback(regexes, expect):
      """
      See also
      --------
      test_distributed.py::test_shorten_traceback_excepthook
      test_distributed.py::test_shorten_traceback_ipython
      """
      with dask.config.set({"admin.traceback.shorten": regexes}):
          with assert_tb_levels(expect):
              with shorten_traceback():
                  f3()
  
file_path: dask/dask/tests/test_traceback.py
imports: from __future__ import annotations
  import traceback
  from contextlib import contextmanager
  import pytest
  import dask
  from dask.utils import shorten_traceback
label_desc: Use image node_id 5 for calling a global function with example usage: test_shorten_traceback(regexes, expect) without return types