code: def test_diag_gaussian_entropy():
      """distribution test"""
      logits = torch.from_numpy(np.random.randn(6))
      dist = DiagonalGaussianProbabilityDistribution(
          logits=logits,
          action_space=Box(
              low=0.0, high=10.0, shape=(3,), dtype=np.float64
          ),
          temperature=1.0,
      )
      assert dist.entropy().numpy().ndim == 0
  
      logits = torch.from_numpy(np.random.randn(100, 6))
      dist = DiagonalGaussianProbabilityDistribution(
          logits=logits,
          action_space=Box(
              low=0.0, high=10.0, shape=(3,), dtype=np.float64
          ),
          temperature=1.0,
      )
      assert dist.entropy().numpy().ndim == 1
      assert dist.entropy().numpy().shape == (100,)
  
      logits = torch.from_numpy(np.random.randn(100, 8, 6))
      dist = DiagonalGaussianProbabilityDistribution(
          logits=logits,
          action_space=Box(
              low=0.0, high=10.0, shape=(3,), dtype=np.float64
          ),
          temperature=1.0,
      )
      assert dist.entropy().numpy().ndim == 2
      assert dist.entropy().numpy().shape == (100, 8)
  
file_path: maze/maze/test/distributions/test_gaussian.py
imports: import numpy
  import torch
  from gym.spaces import Box
  from maze.distributions.gaussian import DiagonalGaussianProbabilityDistribution
label_desc: Use image node_id 2 for calling a global function with example usage: test_diag_gaussian_entropy() without return types