def METHOD_NAME(variant):
    @pytest.fixture()
    def fixture():
        try:
            clean_up()
            mi.set_variant(variant)
        except Exception:
            pytest.skip('Mitsuba variant "%s" is not enabled!' % variant)
    globals()['variant_' + variant] = fixture