code: def test_bernoulli_logprob():
      """distribution test"""
      logits = torch.from_numpy(np.random.randn(5))
      dist = BernoulliProbabilityDistribution(
          logits=logits, action_space=spaces.MultiBinary(5)
      )
      assert dist.log_prob(actions=dist.sample()).numpy().ndim == 1
  
      logits = torch.from_numpy(np.random.randn(100, 5))
      dist = BernoulliProbabilityDistribution(
          logits=logits, action_space=spaces.MultiBinary(5)
      )
      assert dist.log_prob(actions=dist.sample()).numpy().ndim == 2
      assert dist.log_prob(actions=dist.sample()).numpy().shape == (
          100,
          5,
      )
  
      logits = torch.from_numpy(np.random.randn(100, 8, 5))
      dist = BernoulliProbabilityDistribution(
          logits=logits, action_space=spaces.MultiBinary(5)
      )
      assert dist.log_prob(actions=dist.sample()).numpy().ndim == 3
      assert dist.log_prob(actions=dist.sample()).numpy().shape == (
          100,
          8,
          5,
      )
  
file_path: maze/maze/test/distributions/test_bernoulli.py
imports: import numpy
  import torch
  from gym import spaces
  from maze.distributions.bernoulli import BernoulliProbabilityDistribution
label_desc: Use image node_id 4 for calling a global function with example usage: test_bernoulli_logprob() without return types