code: def collect(self):
      import doctest
  
      module = self._getobj()
      # uses internal doctest module parsing mechanism
      finder = doctest.DocTestFinder()
      optionflags = _pytest.doctest.get_optionflags(self)
      runner = doctest.DebugRunner(verbose=0, optionflags=optionflags)
  
      try:
          for test in finder.find(module, self.name[: -len(".py")]):
              if test.examples:  # skip empty doctests
                  yield getattr(
                      _pytest.doctest.DoctestItem,
                      "from_parent",
                      _pytest.doctest.DoctestItem,
                  )(
                      name=test.name,
                      parent=self,
                      runner=runner,
                      dtest=test,
                  )
      except Exception:
          logging.exception(
              "DoctestModule failed, probably you can add NO_DOCTESTS() macro to ya.make"
          )
          etype, exc, tb = sys.exc_info()
          msg = "DoctestModule failed, probably you can add NO_DOCTESTS() macro to ya.make"
          reraise(etype, type(exc)("{}\n{}".format(exc, msg)), tb)
  
imports: import os
  import sys
  from six import reraise
  import logging
  import py
  import pytest
  import _pytest.python
  import _pytest.doctest
  import json
  import library.python.testing.filter.filter
label_desc: Use image node_id 1 for calling the DoctestModule obj's underlying member method code with example usage: obj.collect() without return types