def test_shuffle_values_raises():
    df = pd.DataFrame({'a': [1, 3, 2]})
    ddf = dd.from_pandas(df, npartitions=3)
    with pytest.raises(ValueError, match="na_position must be either 'first' or 'last'"):
        ddf.sort_values(by='a', na_position='invalid')
def test_shuffle_values_raises():
    df = pd.DataFrame({'a': [1, 3, 2]})
    ddf = dd.from_pandas(df, npartitions=3)
    with pytest.raises(ValueError, match="na_position must be either 'first' or 'last'"):
        ddf.sort_values(by='a', na_position='invalid')