def METHOD_NAME(self, msg):
    name = msg["name"]
    fn = msg["fn"]
    value = msg["value"]
    is_observed = msg["is_observed"]
    if name not in self.guide.prototype_trace.nodes:
        return {"fn": fn, "value": value, "is_observed": is_observed}
    if is_observed:
        raise NotImplementedError(
            f"At pyro.sample({repr(name)},...), "
            "StructuredReparam does not support observe statements"
        )
    if name not in self.deltas:  # On first sample site.
        with ExitStack() as stack:
            for plate in self.guide.plates.values():
                stack.enter_context(block_plate(dim=plate.dim, strict=False))
            self.deltas = self.guide.get_deltas()
    new_fn = self.deltas.pop(name)
    value = new_fn.v
    if poutine.get_mask() is not False:
        log_density = new_fn.log_density + fn.log_prob(value)
        new_fn = dist.Delta(value, log_density, new_fn.event_dim)
    return {"fn": new_fn, "value": value, "is_observed": True}