code: def test_permutation_randomness(self):
      if self.mask > self.num_half:
          return
      index = numpy.arange(self.num_half)
      index = (index * self.gap + self.offset) % self.num
      samples = self.a[index]
      ret = samples & self.mask > 0
      count = numpy.count_nonzero(ret)  # expectation: self.num_half / 2
      if count > self.num_half - count:
          count = self.num_half - count
      prob_le_count = self._calc_probability(count)
      if prob_le_count < 0.001:
          raise
  
imports: import unittest
  import numpy
  import pytest
  import cupy
  from cupy import testing
  from cupy.testing import _condition
label_desc: Use image node_id 2 for calling the TestPermutationRandomness obj's underlying member method code with example usage: obj.test_permutation_randomness() without return types