code: def test_persist_shorten_traceback(scheduler):
      d = dask.delayed(f3)()
  
      TEST_NAME = "test_persist_shorten_traceback"
      if scheduler == "processes" and not tblib:
          remote_stack = ["reraise"]
      else:
          remote_stack = ["f3", "f2", "f1"]
  
      expect = [TEST_NAME, "persist", *remote_stack]
      with assert_tb_levels(expect):
          dask.persist(d(), scheduler=scheduler)
  
      expect = [TEST_NAME, "persist", "persist", *remote_stack]
      with assert_tb_levels(expect):
          d.persist(scheduler=scheduler)
  
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 7 for calling a global function with example usage: test_persist_shorten_traceback(scheduler) without return types