code: def _mean_prediction(self, mu, Y, h, t_z):
               
  
          # Create arrays to iteratre over
          Y_exp = Y.copy()
  
          # Loop over h time periods          
          for t in range(0,h):
  
              if self.ar != 0:
                  Y_exp_normalized = (Y_exp[-self.ar:][::-1] - self._norm_mean) / self._norm_std
                  new_value = self.predict_new(np.append(1.0, Y_exp_normalized), self.latent_variables.get_z_values())
  
              else:  
                  new_value = self.predict_new(np.array([1.0]), self.latent_variables.get_z_values())
  
              Y_exp = np.append(Y_exp, [self.link(new_value)])
  
          return Y_exp
docs: Creates a h-step ahead mean prediction
  
          Parameters
          ----------
          mu : np.ndarray
              The past predicted values
  
          Y : np.ndarray
              The past data
  
          h : int
              How many steps ahead for the prediction
  
          t_z : np.ndarray
              A vector of (transformed) latent variables
  
          Returns
          ----------
          h-length vector of mean predictions