``def _permute_observations(x, y, num_perms, shuffle_f=shuffle)``

...and then change ``shuffle`` on line 791 to ``shuffle_f``