code: def test_no_duplicates(rootdir, tmp_path):
      """Make sure that a ".pyx" and ".so" don't cause duplicate listings.
  
      We can't use pytest.mark.apidoc here as we use a different set of arguments
      to apidoc_main
      """
      original_suffixes = sphinx.ext.apidoc.PY_SUFFIXES
      try:
          # Ensure test works on Windows
          sphinx.ext.apidoc.PY_SUFFIXES += (".so",)
  
          package = rootdir / "test-apidoc-duplicates" / "fish_licence"
          outdir = tmp_path / "out"
          apidoc_main(
              [
                  "-o",
                  str(outdir),
                  "-T",
                  str(package),
                  "--implicit-namespaces",
              ]
          )
  
          # Ensure the module has been documented
          assert os.path.isfile(outdir / "fish_licence.rst")
  
          # Ensure the submodule only appears once
          text = (outdir / "fish_licence.rst").read_text(
              encoding="utf-8"
          )
          count_submodules = text.count(r"fish\_licence.halibut module")
          assert count_submodules == 1
  
      finally:
          sphinx.ext.apidoc.PY_SUFFIXES = original_suffixes
  
imports: import os.path
  from collections import namedtuple
  import pytest
  import sphinx.ext.apidoc
  from sphinx.ext.apidoc import main
label_desc: Use image node_id 28 for calling a global function with example usage: test_no_duplicates(rootdir, tmp_path) without return types