code: def test_html_download_role(app, status, warning):
      app.build()
      assert not (app.outdir / "_downloads" / "dummy.dat").exists()
  
      content = (app.outdir / "index.xhtml").read_text(encoding="utf8")
      assert (
          '<li><p><code class="xref download docutils literal notranslate">'
          '<span class="pre">dummy.dat</span></code></p></li>'
          in content
      )
      assert (
          '<li><p><code class="xref download docutils literal notranslate">'
          '<span class="pre">not_found.dat</span></code></p></li>'
          in content
      )
      assert (
          '<li><p><code class="xref download docutils literal notranslate">'
          '<span class="pre">Sphinx</span> <span class="pre">logo</span></code>'
          '<span class="link-target"> [https://www.sphinx-doc.org/en/master'
          "/_static/sphinx-logo.svg]</span></p></li>" in content
      )
  
imports: import os
  import subprocess
  from pathlib import Path
  from subprocess import CalledProcessError
  from xml.etree import ElementTree
  import pytest
  from sphinx.builders.epub3 import _XML_NAME_PATTERN
label_desc: Use image node_id 10 for calling a global function with example usage: test_html_download_role(app, status, warning) without return types