code: def test_lnnb_shapes(num_quad_points, shape):
      logits = torch.randn(shape)
      total_count = 5.0
      multiplicative_noise_scale = torch.rand(shape)
  
      d = LogNormalNegativeBinomial(
          total_count,
          logits,
          multiplicative_noise_scale,
          num_quad_points=num_quad_points,
      )
  
      assert d.batch_shape == shape
      assert d.log_prob(torch.ones(shape)).shape == shape
  
      assert d.expand(shape + shape).batch_shape == shape + shape
      assert (
          d.expand(shape + shape).log_prob(torch.ones(shape)).shape
          == shape + shape
      )
  
imports: import pytest
  import torch
  from pyro.distributions import LogNormalNegativeBinomial
  from tests.common import assert_close
label_desc: Use image node_id 1 for calling a global function with example usage: test_lnnb_shapes(num_quad_points, shape) without return types