def _inject_setup_function_fixture(self):
setup_function = _get_non_fixture_func(self.obj, "<STR_LIT>")<EOL>teardown_function = _get_non_fixture_func(self.obj, "<STR_LIT>")<EOL>if setup_function is None and teardown_function is None:<EOL><INDENT>return<EOL><DEDENT>@fixtures.fixture(autouse=True, scope="<STR_LIT>")<EOL>def xunit_setup_function_fixture(request):<EOL><INDENT>if request.instance is not None:<EOL><INDENT>yield<EOL>return<EOL><DEDENT>if setup_function is not None:<EOL><INDENT>_call_with_optional_argument(setup_function, request.function)<EOL><DEDENT>yield<EOL>if teardown_function is not None:<EOL><INDENT>_call_with_optional_argument(teardown_function, request.function)<EOL><DEDENT><DEDENT>self.obj.__pytest_setup_function = xunit_setup_function_fixture<EOL>
Injects a hidden autouse, function scoped fixture into the collected module object
        that invokes setup_function/teardown_function if either or both are available.

        Using a fixture to invoke this methods ensures we play nicely and unsurprisingly with
        other fixtures (#517).