<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def posterior(self, x):
 """Posterior function. Returns ``P(x) = \int L(x,y|z') L(y) dy / \int L(x,y|z') L(y) dx dy`` This will used the cached '~fermipy.castro.Interpolator' object if possible, and construct it if needed. """

        if self._post is None:
            return self._posterior(x)
        x = np.array(x, ndmin=1)
        return self._post_interp(x)