Replaced xrange() with range() in sparse unit test