The censoring example code is for the situation like: you have a device taking a measurement, but the device has some physical limit - for example, it cannot take measure >10. Which means that in your observation you have values that are 10s but you don’t know whether they are 10 or >10.
What a censoring model does is that, it takes all the observed values that are 10s and compute the integral of the tail. The intuition here is that since the actual value could be 10 and above (but we dont know for sure as the device is capped), we take the expectation of the value >=10 (instead of inputting 10 as the observed). And this expectation is equal to taking the integral of the tail cdf(value>=10 | parameters).
You can find some more detail discussions about censoring model in this post: Truncated Inverse normal distribution (also known as Wald distribution)