code: def _make_xunit_fixture(
      obj, setup_name, teardown_name, scope, pass_self
  ):
      setup = getattr(obj, setup_name, None)
      teardown = getattr(obj, teardown_name, None)
      if setup is None and teardown is None:
          return None
  
      @pytest.fixture(scope=scope, autouse=True)
      def fixture(self, request):
          if getattr(self, "__unittest_skip__", None):
              reason = self.__unittest_skip_why__
              pytest.skip(reason)
          if setup is not None:
              if pass_self:
                  setup(self, request.function)
              else:
                  setup()
          yield
          if teardown is not None:
              if pass_self:
                  teardown(self, request.function)
              else:
                  teardown()
  
      return fixture
  
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 2 for calling a global function with example usage: _make_xunit_fixture(obj, setup_name, teardown_name, scope, pass_) and returns: fixture, None