code: def collect_errors() -> list[str]:
      errors: list[tuple[str, str, int]] = []
  
      def test_this_file(fname: str, test_file: IO[str]) -> None:
          for line_no, line in enumerate(test_file, 1):
              if "request.host" in line.split("#")[0]:
                  errors.append((message, fname, line_no))
  
      paths = (
          check_output(["git", "ls-files"]).decode("utf-8").split("\n")
      )
  
      for path in paths:
          if not path:
              continue
  
          if not path.endswith(".py"):
              continue
  
          if not path.startswith("bokeh/server"):
              continue
  
          with open(path, encoding="utf-8") as file:
              test_this_file(path, file)
  
      return [
          msg.format(path=fname, line_no=line_no)
          for (msg, fname, line_no) in errors
      ]
  
imports: from __future__ import annotations
  import pytest
  from subprocess import check_output
  from typing import IO
label_desc: Use image node_id 2 for calling a global function with example usage: collect_errors() and returns: unknown