class_docstr: Compound distribution comprising of a dirichlet-multinomial pair. The probability of
  classes (``probs`` for the :class:`~pyro.distributions.Multinomial` distribution)
  is unknown and randomly drawn from a :class:`~pyro.distributions.Dirichlet`
  distribution prior to a certain number of Categorical trials given by
  ``total_count``.
  
  :param float or torch.Tensor concentration: concentration parameter (alpha) for the
      Dirichlet distribution.
  :param int or torch.Tensor total_count: number of Categorical trials.
  :param bool is_sparse: Whether to assume value is mostly zero when computing
      :meth:`log_prob`, which can speed up computation when data is sparse.
class_docstr_tok: ["Compound","distribution","comprising","of","a","dirichlet-multinomial","pair",".","The","probability","of","classes","(","``","probs","``","for","the",":","class",":","`","~pyro.distributions.Multinomial","`","distribution",")","is","unknown","and","randomly","drawn","from","a",":","class",":","`","~pyro.distributions.Dirichlet","`","distribution","prior","to","a","certain","number","of","Categorical","trials","given","by","``","total_count","``",".",":","param","float","or","torch.Tensor","concentration",":","concentration","parameter","(","alpha",")","for","the","Dirichlet","distribution",".",":","param","int","or","torch.Tensor","total_count",":","number","of","Categorical","trials",".",":","param","bool","is_sparse",":","Whether","to","assume","value","is","mostly","zero","when","computing",":","meth",":","`","log_prob","`",",","which","can","speed","up","computation","when","data","is","sparse","."]
code: def infer_shapes(concentration, total_count=()):
      batch_shape = broadcast_shape(concentration[:-1], total_count)
      event_shape = concentration[-1:]
      return batch_shape, event_shape
  
imports: import numbers
  import torch
  from torch.distributions.utils import broadcast_all
  from pyro.ops.special import log_beta, log_binomial
  from .None import constraints
  from .torch import Beta, Binomial, Dirichlet, Gamma, Multinomial, Poisson
  from .torch_distribution import TorchDistribution
  from .util import broadcast_shape
label_desc: Use image node_id 3 for calling the DirichletMultinomial obj's underlying member method code with example usage: obj.infer_shapes(concentration, total_count) and returns: batch_shape,  event_shape