def METHOD_NAME(tri):
    from ..matrix_plotting import _sanitize_tri
    with pytest.raises(
        ValueError,
        match=(
            "Parameter tri needs to be "
            f"one of: {', '.join(VALID_TRI_VALUES)}"
        ),
    ):
        _sanitize_tri(tri)