code: def test_object_description_content_line_number(app):
      text = (
          ".. py:function:: foo(bar)\n"
          + "\n"
          + "   Some link here: :ref:`abc`\n"
      )
      doc = restructuredtext.parse(app, text)
      xrefs = list(doc.findall(condition=addnodes.pending_xref))
      assert len(xrefs) == 1
      source, line = docutils.utils.get_source_line(xrefs[0])
      assert "index.rst" in source
      assert line == 3
  
file_path: sphinx/tests/test_directives/test_directive_object_description.py
imports: import docutils.utils
  import pytest
  from docutils import nodes
  from sphinx import addnodes
  from sphinx.io import create_publisher
  from sphinx.testing import restructuredtext
  from sphinx.util.docutils import sphinx_domains
label_desc: Use image node_id 3 for calling a global function with example usage: test_object_description_content_line_number(app) without return types