code: def _mean_prediction(self, theta, Y, scores, h, t_params, X_oos):
               
  
          Y_exp = Y.copy()
          theta_exp = theta.copy()
          scores_exp = scores.copy()
  
          #(TODO: vectorize the inner construction here)      
          for t in range(0,h):
              new_value = t_params[0]
  
              if self.ar != 0:
                  for j in range(1,self.ar+1):
                      new_value += t_params[j]*theta_exp[-j]
              if self.sc != 0:
                  for k in range(1,self.sc+1):
                      new_value += t_params[k+self.ar]*scores_exp[-k]
  
              new_value += np.matmul(X_oos[t,:],t_params[self.sc+self.ar:(self.sc+self.ar+len(self.X_names))])            
  
              if self.model_name2 == "Exponential GAS":
                  Y_exp = np.append(Y_exp,[1.0/self.link(new_value)])
              else:
                  Y_exp = np.append(Y_exp,[self.link(new_value)])
              theta_exp = np.append(theta_exp,[new_value]) # For indexing consistency
              scores_exp = np.append(scores_exp,[0]) # expectation of score is zero
  
          return Y_exp
docs: Creates a h-step ahead mean prediction
  
          Parameters
          ----------
          theta : np.array
              The past predicted values
  
          Y : np.array
              The past data
  
          scores : np.array
              The past scores
  
          h : int
              How many steps ahead for the prediction
  
          t_params : np.array
              A vector of (transformed) latent variables
  
          X_oos : np.array
              Out of sample X data
  
          Returns
          ----------
          Y_exp : np.array
              Vector of past values and predictions