def METHOD_NAME(self, value):
    """
    Get a `pyro.distributions.Normal` distribution that encodes the posterior distribution
    over the vector of latents specified by `prior_loc` and `prior_scale` conditioned on the
    observed data specified by `value`.
    """
    if value.shape != self.group_idx.shape:
        raise ValueError(
            "GroupedNormalNormal.get_posterior only supports values that have the same shape as group_idx."
        )
    obs_scale_sq_inv = self.obs_scale.pow(-2)
    prior_scale_sq_inv = self.prior_scale.pow(-2)
    obs_scale_sq_inv_sum = torch.zeros_like(self.prior_loc).scatter_add(
        0, self.group_idx, obs_scale_sq_inv
    )
    precision = prior_scale_sq_inv + obs_scale_sq_inv_sum
    scaled_value_sum = torch.zeros_like(self.prior_loc).scatter_add(
        0, self.group_idx, value * obs_scale_sq_inv
    )
    loc = (scaled_value_sum + self.prior_loc * prior_scale_sq_inv) / precision
    scale = precision.rsqrt()
    return Normal(loc=loc, scale=scale)