code: def isort(dir: str) -> None:
      """Assures that the Python codebase imports are correctly sorted."""
      chdir(TOP_PATH)
      proc = run(
          ["isort", "--gitignore", "--diff", "-c", dir],
          capture_output=True,
      )
      assert (
          proc.returncode == 0
      ), f"isort issues:\n{proc.stdout.decode('utf-8')}"
  
file_path: bokeh/tests/codebase/test_isort.py
imports: from __future__ import annotations
  import pytest
  from os import chdir
  from subprocess import run
  from tests.support.util.project import TOP_PATH
label_desc: Use image node_id 7 for calling a global function with example usage: isort(dir) without return types