def mock_change_index_side_effect(f, t): if t == 3: raise FileSet.IndexAssignedError(f, t, "Index assigned.")