code: def samples(self, gp, Y_metadata=None):
          
          orig_shape = gp.shape
          gp = gp.flatten()
          # Ysim = np.random.poisson(self.gp_link.transf(gp), [samples, gp.size]).T
          # return Ysim.reshape(orig_shape+(samples,))
          Ysim = np.random.poisson(self.gp_link.transf(gp))
          return Ysim.reshape(orig_shape)
docs: Returns a set of samples of observations based on a given value of the latent variable.
  
          :param gp: latent variable