'Check choice(a, size) against pop.'

def _check_choice_2(self, a, pop):

    cfunc = jit(nopython=True)(numpy_choice2)
    n = len(pop)
    sizes = [(n - 10), (3, ((n - 1) // 3)), (n * 10)]
    for size in sizes:
        res = cfunc(a, size)
        expected_shape = (size if isinstance(size, tuple) else (size,))
        self.assertEqual(res.shape, expected_shape)
        self._check_array_results((lambda : cfunc(a, size)), pop)
