code: def pytest_runtest_setup(item):
      if is_potential_nosetest(item):
          if not call_optional(item.obj, "setup"):
              # call module level setup if there is no object level one
              call_optional(item.parent.obj, "setup")
          # XXX this implies we only call teardown when setup worked
          item.session._setupstate.addfinalizer(
              (lambda: teardown_nose(item)), item
          )
  
file_path: catboost/contrib/python/pytest/py2/_pytest/nose.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import sys
  import six
  import pytest
  from _pytest import python
  from _pytest import runner
  from _pytest import unittest
  from _pytest.config import hookimpl
label_desc: Use image node_id 3 for calling a global function with example usage: pytest_runtest_setup(item) without return types