def sample_prior_predictive(rng_key, model, model_args, substitutes=None, with_intermediates=False, **kwargs):
    ' Samples once from the prior predictive distribution.\n\n    Individual sample sites, as designated by `sample`, can be frozen to\n    pre-determined values given in `substitutes`. In that case, values for these\n    sites are not actually sampled but the value provided in `substitutes` is\n    returned as the sample. This facilitates conditional sampling.\n\n    Note that if the model function is written in such a way that it returns, e.g.,\n    multiple observations from a single prior draw, the same is true for the\n    values returned by this function.\n\n    :param rng_key: Jax PRNG key\n    :param model: Function representing the model using numpyro distributions\n        and the `sample` primitive\n    :param model_args: Arguments to the model function\n    :param substitutes: An optional dictionary of frozen substitutes for\n        sample sites.\n    :param with_intermediates: If True, intermediate(/latent) samples from\n        sample site distributions are included in the result.\n    :param **kwargs: Keyword arguments passed to the model function.\n    :return: Dictionary of sampled values associated with the names given\n        via `sample()` in the model. If with_intermediates is True,\n        dictionary values are tuples where the first element is the final\n        sample values and the second element is a list of intermediate values.\n    '
    if (substitutes is None):
        substitutes = dict()
    model = seed(substitute(model, data=substitutes), rng_key)
    t = trace(model).get_trace(*model_args, **kwargs)
    return get_samples_from_trace(t, with_intermediates)
Samples once from the prior predictive distribution.

Individual sample sites, as designated by `sample`, can be frozen to
pre-determined values given in `substitutes`. In that case, values for these
sites are not actually sampled but the value provided in `substitutes` is
returned as the sample. This facilitates conditional sampling.

Note that if the model function is written in such a way that it returns, e.g.,
multiple observations from a single prior draw, the same is true for the
values returned by this function.

:param rng_key: Jax PRNG key
:param model: Function representing the model using numpyro distributions
    and the `sample` primitive
:param model_args: Arguments to the model function
:param substitutes: An optional dictionary of frozen substitutes for
    sample sites.
:param with_intermediates: If True, intermediate(/latent) samples from
    sample site distributions are included in the result.
:param **kwargs: Keyword arguments passed to the model function.
:return: Dictionary of sampled values associated with the names given
    via `sample()` in the model. If with_intermediates is True,
    dictionary values are tuples where the first element is the final
    sample values and the second element is a list of intermediate values.
def sample_prior_predictive(rng_key, model, model_args, substitutes=None, with_intermediates=False, **kwargs):
    ' Samples once from the prior predictive distribution.\n\n    Individual sample sites, as designated by `sample`, can be frozen to\n    pre-determined values given in `substitutes`. In that case, values for these\n    sites are not actually sampled but the value provided in `substitutes` is\n    returned as the sample. This facilitates conditional sampling.\n\n    Note that if the model function is written in such a way that it returns, e.g.,\n    multiple observations from a single prior draw, the same is true for the\n    values returned by this function.\n\n    :param rng_key: Jax PRNG key\n    :param model: Function representing the model using numpyro distributions\n        and the `sample` primitive\n    :param model_args: Arguments to the model function\n    :param substitutes: An optional dictionary of frozen substitutes for\n        sample sites.\n    :param with_intermediates: If True, intermediate(/latent) samples from\n        sample site distributions are included in the result.\n    :param **kwargs: Keyword arguments passed to the model function.\n    :return: Dictionary of sampled values associated with the names given\n        via `sample()` in the model. If with_intermediates is True,\n        dictionary values are tuples where the first element is the final\n        sample values and the second element is a list of intermediate values.\n    '
    if (substitutes is None):
        substitutes = dict()
    model = seed(substitute(model, data=substitutes), rng_key)
    t = trace(model).get_trace(*model_args, **kwargs)
    return get_samples_from_trace(t, with_intermediates)