code: def check_log_prob(self, is_gpu):
      smp = self.sample_for_test()
      if is_gpu:
          log_prob1 = self.gpu_dist.log_prob(cuda.to_gpu(smp)).data
      else:
          log_prob1 = self.cpu_dist.log_prob(smp).data
  
      if self.continuous:
          scipy_prob = self.scipy_dist.logpdf
      else:
          scipy_prob = self.scipy_dist.logpmf
  
      if self.scipy_onebyone:
          onebyone_smp = smp.reshape(
              *[
                  utils.size_of_shape(sh)
                  for sh in [
                      self.sample_shape,
                      self.shape,
                      self.event_shape,
                  ]
              ]
          )
          onebyone_smp = numpy.swapaxes(onebyone_smp, 0, 1)
          onebyone_smp = onebyone_smp.reshape(
              (-1,) + self.sample_shape + self.event_shape
          )
          log_prob2 = []
          for one_params, one_smp in zip(
              self.scipy_onebyone_params_iter(), onebyone_smp
          ):
              log_prob2.append(scipy_prob(one_smp, **one_params))
          log_prob2 = numpy.vstack(log_prob2)
          log_prob2 = log_prob2.reshape(
              utils.size_of_shape(self.shape), -1
          ).T
          log_prob2 = log_prob2.reshape(self.sample_shape + self.shape)
      else:
          log_prob2 = scipy_prob(smp, **self.scipy_params)
      array.assert_allclose(log_prob1, log_prob2)
  
imports: import functools
  import unittest
  import numpy
  import chainer
  from chainer.backends import cuda
  from chainer.testing import array
  from chainer.testing import attr
  from chainer import utils
label_desc: Use image node_id 21 for calling the distribution_unittest obj's underlying member method code with example usage: obj.check_log_prob(is_gpu) without return types