code: def check_log_prob_binary_check(self, is_gpu):
      smp = self.sample_for_binary_check_test()
      if is_gpu:
          log_prob = self.gpu_dist.log_prob(cuda.to_gpu(smp)).data
      else:
          log_prob = self.cpu_dist.log_prob(smp).data
      xp = backend.get_array_module(log_prob)
      if self.binary_check:
          self.assertTrue(xp.all(log_prob == -xp.inf))
      else:
          self.assertTrue(xp.all(xp.isfinite(log_prob)))
  
imports: import unittest
  import numpy
  from chainer import backend
  from chainer.backends import cuda
  from chainer import distributions
  from chainer import gradient_check
  from chainer import testing
  from chainer.testing import attr
label_desc: Use image node_id 5 for calling the TestBernoulli obj's underlying member method code with example usage: obj.check_log_prob_binary_check(is_gpu) without return types