def METHOD_NAME(num_samples, parallel):
    model, data, true_probs = beta_bernoulli()
    init_params, potential_fn, transforms, _ = initialize_model(
        model, model_args=(data,)
    )
    nuts_kernel = NUTS(potential_fn=potential_fn, transforms=transforms)
    mcmc = MCMC(nuts_kernel, 100, initial_params=init_params, warmup_steps=100)
    mcmc.run(data)
    samples = mcmc.get_samples()
    with optional(pytest.warns(UserWarning), num_samples not in (None, 100)):
        predictive = Predictive(
            model,
            samples,
            num_samples=num_samples,
            return_sites=["beta", "obs"],
            parallel=parallel,
        )
        predictive_samples = predictive()
    # check shapes
    assert predictive_samples["beta"].shape == (100, 1, 5)
    assert predictive_samples["obs"].shape == (100, 1000, 5)
    # check sample mean
    assert_close(
        predictive_samples["obs"].reshape([-1, 5]).mean(0), true_probs, rtol=0.1
    )