code: def test_private(tmp_path):
      (tmp_path / "hello.py").write_text("", encoding="utf8")
      (tmp_path / "_world.py").write_text("", encoding="utf8")
  
      # without --private option
      apidoc_main(["-o", str(tmp_path), str(tmp_path)])
      assert (tmp_path / "hello.rst").exists()
      assert ":private-members:" not in (
          tmp_path / "hello.rst"
      ).read_text(encoding="utf8")
      assert not (tmp_path / "_world.rst").exists()
  
      # with --private option
      apidoc_main(
          ["--private", "-f", "-o", str(tmp_path), str(tmp_path)]
      )
      assert (tmp_path / "hello.rst").exists()
      assert ":private-members:" in (tmp_path / "hello.rst").read_text(
          encoding="utf8"
      )
      assert (tmp_path / "_world.rst").exists()
  
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 19 for calling a global function with example usage: test_private(tmp_path) without return types