#NEWLINE# def test_complex_example( self ) : #NEWLINE# #INDENT# sample = np . array ( [ 0 , 1 , 1 , 2 , 3 , 1 , 4 , 3 , 2 ] ) #NEWLINE# correct_votes = np . array ( [ [ 1 , 0 , 0 , 0 , 0 ] , [ 0 , 1 , 0 , 0 , 0 ] , [ 0 , 1 , 0 , 0 , 0 ] , [ 0 , 0 , 1 , 0 , 0 ] , [ 0 , 0 , 0 , 1 , 0 ] , [ 0 , 1 , 0 , 0 , 0 ] , [ 0 , 0 , 0 , 0 , 1 ] , [ 0 , 0 , 0 , 1 , 0 ] , [ 0 , 0 , 1 , 0 , 0 ] ] ) #NEWLINE# assert np . all ( ( transform2votes ( sample , 5 ) == correct_votes ) )