def METHOD_NAME():
    def model(design):
        batch_shape = design.shape
        with ExitStack() as stack:
            for plate in iter_plates_to_shape(batch_shape):
                stack.enter_context(plate)
            theta = pyro.sample("theta", dist.Bernoulli(0.4).expand(batch_shape))
            y = pyro.sample("y", dist.Bernoulli((design + theta) / 2.0))
            return y
    return model