code: def test_categorical_log_prob_shape():
      probs = torch.ones(3, 2, 4) / 4
      x = torch.zeros(3, 2)
      d = dist.Categorical(probs)
      assert d.log_prob(x).size() == (3, 2)
  
file_path: pyro/tests/distributions/test_shapes.py
imports: import torch
  import pyro.distributions
label_desc: Use image node_id 7 for calling a global function with example usage: test_categorical_log_prob_shape() without return types