Consider the definition of the `observe`

statement from Probabilistic Programming, as defined in [1]:

The

`observe`

statement blocks runs which do not satisfy the boolean expression`E`

and does not permit those executions to happen.

Now, consider the following theoretical program:

```
def f():
x ~ Normal(0, 1)
observe(x > 0) # only allow samples x > 0
return x
```

which should return values from the truncated `Normal(0, 1)`

distribution.

Therefore, my question is: **how can** `observe`

**be implemented in Pyro, or what’s its equivalent?**

Of course, `observe`

's argument can be any boolean expression `E`

.

[1] Gordon, Andrew D., et al. “Probabilistic programming.” *Proceedings of the on Future of Software Engineering* . 2014. 167-181.