<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def samples(self, gp, Y_metadata=None):
 """ Returns a set of samples of observations conditioned on a given value of latent variable f. :param gp: latent variable """

        orig_shape = gp.shape
        gp = gp.flatten()
        weibull_samples = np.array([sp.stats.weibull_min.rvs(self.r, loc=0, scale=self.gp_link.transf(f)) for f in gp])
        return weibull_samples.reshape(orig_shape)