def METHOD_NAME(sg, arg2):
    """Test spacegroupify decorator with provided arguments"""
    if isinstance(arg2, float):
        with pytest.raises(ValueError):
            result_spacegroup, result_arg2 = _function_arg(sg, arg2=arg2)
    else:
        result_spacegroup, result_arg2 = _function_arg(sg, arg2=arg2)
        # spacegroup argument should be unchanged
        assert result_spacegroup == sg
        # check arg2 coercion to gemmi instance
        if arg2 is None:
            assert result_arg2 is None
        elif isinstance(arg2, gemmi.SpaceGroup):
            assert result_arg2.xhm() == arg2.xhm()
        else:
            assert isinstance(result_arg2, gemmi.SpaceGroup)
            expected = gemmi.SpaceGroup(arg2)
            assert result_arg2.xhm() == expected.xhm()