class_docstr: Holds the marginal distribution over one or more sites from the ``TracePosterior``'s
  model. This is a convenience container class, which can be extended by ``TracePosterior``
  subclasses. e.g. for implementing diagnostics.
  
  :param TracePosterior trace_posterior: a TracePosterior instance representing
      a Monte Carlo posterior.
  :param list sites: optional list of sites for which we need to generate
      the marginal distribution.
code: def _populate_traces(self, trace_posterior, validate):
      self._marginals = {
          site: EmpiricalMarginal(trace_posterior, site, validate)
          for site in self.sites
      }
  
imports: import numbers
  import warnings
  from abc import ABCMeta, abstractmethod
  from collections import OrderedDict, defaultdict
  import torch
  import pyro.poutine
  from pyro.distributions import Categorical, Empirical
  from pyro.ops.stats import waic
  from pyro.poutine.util import site_is_subsample
label_desc: Use image node_id 2 for calling the Marginals obj's underlying member method code with example usage: obj._populate_traces(trace_posterior, validate) without return types