code: def test_import_by_name():
      import sphinx
      import sphinx.ext.autosummary
  
      prefixed_name, obj, parent, modname = import_by_name("sphinx")
      assert prefixed_name == "sphinx"
      assert obj is sphinx
      assert parent is None
      assert modname == "sphinx"
  
      prefixed_name, obj, parent, modname = import_by_name(
          "sphinx.ext.autosummary.__name__"
      )
      assert prefixed_name == "sphinx.ext.autosummary.__name__"
      assert obj is sphinx.ext.autosummary.__name__
      assert parent is sphinx.ext.autosummary
      assert modname == "sphinx.ext.autosummary"
  
      prefixed_name, obj, parent, modname = import_by_name(
          "sphinx.ext.autosummary.Autosummary.get_items"
      )
      assert (
          prefixed_name
          == "sphinx.ext.autosummary.Autosummary.get_items"
      )
      assert obj == sphinx.ext.autosummary.Autosummary.get_items
      assert parent is sphinx.ext.autosummary.Autosummary
      assert modname == "sphinx.ext.autosummary"
  
imports: import sys
  from io import StringIO
  from pathlib import Path
  from unittest.mock import Mock, patch
  import pytest
  from docutils import nodes
  from sphinx import addnodes
  from sphinx.ext.autosummary import autosummary_table, autosummary_toc, extract_summary, import_by_name, mangle_signature
  from sphinx.ext.autosummary.generate import AutosummaryEntry, generate_autosummary_content, generate_autosummary_docs
  from sphinx.ext.autosummary.generate import main
  from sphinx.testing.util import assert_node, etree_parse
  from sphinx.util.docutils import new_document
label_desc: Use image node_id 19 for calling a global function with example usage: test_import_by_name() without return types