code: def pytest_collect_file(path, parent):
      config = parent.config
      if path.ext == ".py":
          if config.option.doctestmodules and not _is_setup_py(
              config, path, parent
          ):
              return DoctestModule(path, parent)
      elif _is_doctest(config, path, parent):
          return DoctestTextfile(path, parent)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import inspect
  import platform
  import sys
  import traceback
  import warnings
  from contextlib import contextmanager
  import pytest
  from _pytest._code.code import ExceptionInfo
  from _pytest._code.code import ReprFileLocation
  from _pytest._code.code import TerminalRepr
  from _pytest.compat import safe_getattr
  from _pytest.fixtures import FixtureRequest
  from _pytest.outcomes import Skipped
  from _pytest.warning_types import PytestWarning
label_desc: Use image node_id 2 for calling a global function with example usage: pytest_collect_file(path, parent) and returns: DoctestModule, DoctestTextfile