def METHOD_NAME(self, value):
    value_shape = broadcast_shape(value.shape, self.batch_shape + self.event_shape)
    if value.shape != value_shape:
        value = value.expand(value_shape)
    if self._validate_args:
        self._validate_sample(value)
    mask_shape = value_shape[: len(value_shape) - len(self.event_shape)]
    mask = self.mask
    if mask.shape != mask_shape:
        mask = mask.expand(mask_shape)
    result = torch.where(
        mask, self.component1.METHOD_NAME(value), self.component0.METHOD_NAME(value)
    )
    return result