code: def test_highlight_empty_source() -> None:
      """Don't crash trying to highlight empty source code.
  
      Issue #11758.
      """
      f = io.StringIO()
      tw = terminalwriter.TerminalWriter(f)
      tw.hasmarkup = True
      tw.code_highlight = True
      tw._write_source([])
  
      assert f.getvalue() == ""
  
imports: import io
  import os
  import re
  import shutil
  import sys
  from pathlib import Path
  from typing import Generator
  from typing import Optional
  from unittest import mock
  import pytest
  from _pytest._io import terminalwriter
  from _pytest.monkeypatch import MonkeyPatch
label_desc: Use image node_id 15 for calling a global function with example usage: test_highlight_empty_source() without return types