code: def collect(self):
      from unittest import TestLoader
  
      cls = self.obj
      if not getattr(cls, "__test__", True):
          return
  
      skipped = getattr(cls, "__unittest_skip__", False)
      if not skipped:
          self._inject_setup_teardown_fixtures(cls)
          self._inject_setup_class_fixture()
  
      self.session._fixturemanager.parsefactories(self, unittest=True)
      loader = TestLoader()
      foundsomething = False
      for name in loader.getTestCaseNames(self.obj):
          x = getattr(self.obj, name)
          if not getattr(x, "__test__", True):
              continue
          funcobj = getimfunc(x)
          yield TestCaseFunction(name, parent=self, callobj=funcobj)
          foundsomething = True
  
      if not foundsomething:
          runtest = getattr(self.obj, "runTest", None)
          if runtest is not None:
              ut = sys.modules.get("twisted.trial.unittest", None)
              if ut is None or runtest != ut.TestCase.runTest:
                  yield TestCaseFunction("runTest", parent=self)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import sys
  import traceback
  import _pytest._code
  import pytest
  from _pytest.compat import getimfunc
  from _pytest.config import hookimpl
  from _pytest.outcomes import fail
  from _pytest.outcomes import skip
  from _pytest.outcomes import xfail
  from _pytest.python import Class
  from _pytest.python import Function
label_desc: Use image node_id 1 for calling the UnitTestCase obj's underlying member method code with example usage: obj.collect() without return types