code: def pytest_ignore_collect(
      collection_path: Path, path: "LEGACY_PATH", config: "Config"
  ) -> Optional[bool]:
      """Return True to prevent considering this path for collection.
  
      This hook is consulted for all files and directories prior to calling
      more specific hooks.
  
      Stops at first non-None result, see :ref:`firstresult`.
  
      :param collection_path: The path to analyze.
      :param path: The path to analyze (deprecated).
      :param config: The pytest config object.
  
      .. versionchanged:: 7.0.0
          The ``collection_path`` parameter was added as a :class:`pathlib.Path`
          equivalent of the ``path`` parameter. The ``path`` parameter
          has been deprecated.
      """
  
imports: from pathlib import Path
  from typing import Any
  from typing import Dict
  from typing import List
  from typing import Mapping
  from typing import Optional
  from typing import Sequence
  from typing import Tuple
  from typing import TYPE_CHECKING
  from typing import Union
  from pluggy import HookspecMarker
  from _pytest.deprecated import WARNING_CMDLINE_PREPARSE_HOOK
label_desc: Use image node_id 12 for calling a global function with example usage: pytest_ignore_collect(collection_path, path, config) without return types