code: def sample(self, nsims=1000):
               
          if self.latent_variables.estimation_method not in ['BBVI', 'M-H']:
              raise Exception("No latent variables estimated!")
          else:
              lv_draws = self.draw_latent_variables(nsims=nsims)
  
              mus = []
              for i in range(nsims):
                  mu, V = self.smoothed_state(self.data, lv_draws[:,i])
                  _, Z, _, _, _ = self._ss_matrices(lv_draws[:,i])
                  smoothed_series = np.zeros(self.y.shape[0])
                  for t in range(0,self.y.shape[0]):
                      smoothed_series[t] = np.dot(Z[t],mu[:,t])
                  mus.append(smoothed_series)
  
              data_draws = np.array([np.random.normal(mus[i], np.sqrt(self.latent_variables.z_list[0].prior.transform(lv_draws[0,i])), mus[i].shape[0]) for i in range(nsims)])
              return data_draws
docs: Samples from the posterior predictive distribution
  
          Parameters
          ----------
          nsims : int (default : 1000)
              How many draws from the posterior predictive distribution
  
          Returns
          ----------
          - np.ndarray of draws from the data