def _inject_setup_method_fixture(self):
setup_method = _get_non_fixture_func(self.obj, "<STR_LIT>")<EOL>teardown_method = getattr(self.obj, "<STR_LIT>", None)<EOL>if setup_method is None and teardown_method is None:<EOL><INDENT>return<EOL><DEDENT>@fixtures.fixture(autouse=True, scope="<STR_LIT>")<EOL>def xunit_setup_method_fixture(self, request):<EOL><INDENT>method = request.function<EOL>if setup_method is not None:<EOL><INDENT>func = getattr(self, "<STR_LIT>")<EOL>_call_with_optional_argument(func, method)<EOL><DEDENT>yield<EOL>if teardown_method is not None:<EOL><INDENT>func = getattr(self, "<STR_LIT>")<EOL>_call_with_optional_argument(func, method)<EOL><DEDENT><DEDENT>self.obj.__pytest_setup_method = xunit_setup_method_fixture<EOL>
Injects a hidden autouse, function scoped fixture into the collected class object
        that invokes setup_method/teardown_method if either or both are available.

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