code: def test_epub_cover(app):
      app.build()
  
      # content.opf / metadata
      opf = EPUBElementTree.fromstring(
          (app.outdir / "content.opf").read_text(encoding="utf8")
      )
      cover_image = opf.find(
          "./idpf:manifest/idpf:item[@href='%s']"
          % app.config.epub_cover[0]
      )
      cover = opf.find("./idpf:metadata/idpf:meta[@name='cover']")
      assert cover
      assert cover.get("content") == cover_image.get("id")
  
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 3 for calling a global function with example usage: test_epub_cover(app) without return types