code: def test_code_block_namedlink_latex(app, status, warning):
      app.build(force_all=True)
      latex = (app.outdir / "python.tex").read_text(encoding="utf8")
      label1 = "\\def\\sphinxLiteralBlockLabel{\\label{\\detokenize{caption:name-test-rb}}}"
      link1 = (
          "\\hyperref[\\detokenize{caption:name-test-rb}]"
          "{\\sphinxcrossref{\\DUrole{std,std-ref}{Ruby}}"
      )
      label2 = (
          "\\def\\sphinxLiteralBlockLabel"
          "{\\label{\\detokenize{namedblocks:some-ruby-code}}}"
      )
      link2 = (
          "\\hyperref[\\detokenize{namedblocks:some-ruby-code}]"
          "{\\sphinxcrossref{\\DUrole{std,std-ref}{the ruby code}}}"
      )
      assert label1 in latex
      assert link1 in latex
      assert label2 in latex
      assert link2 in latex
  
imports: import os.path
  import pytest
  from docutils import nodes
  from sphinx.config import Config
  from sphinx.directives.code import LiteralIncludeReader
  from sphinx.testing.util import etree_parse
label_desc: Use image node_id 30 for calling a global function with example usage: test_code_block_namedlink_latex(app, status, warning) without return types