code: def assert_tb_levels(expect):
      with pytest.raises(ZeroDivisionError) as e:
          yield
      frames = list(traceback.walk_tb(e.tb))
      frame_names = [frame[0].f_code.co_name for frame in frames]
      assert frame_names[0] == "assert_tb_levels", frame_names
      assert frame_names[1:] == expect, frame_names
  
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 1 for calling a global function with example usage: assert_tb_levels(expect) without return types