code: def test_non_unique_index_partition_users():
      """Partitioning users when dataframe has non-unique indices"""
      ratings = lktu.ml_test.ratings
      ratings = ratings.set_index("user")  ##forces non-unique index
      with pytest.raises(ValueError):
          for split in xf.partition_users(ratings, 5, xf.SampleN(5)):
              pass
  
imports: import itertools
  import functools
  import pytest
  import math
  import numpy
  import lenskit.util.test
  import lenskit.crossfold
label_desc: Use image node_id 17 for calling a global function with example usage: test_non_unique_index_partition_users() without return types