code: def _mean_prediction(self, theta, theta_t, Y, scores, h, t_params):
               
  
          Y_exp = Y.copy()
          theta_exp = theta.copy()
          theta_t_exp = theta_t.copy()
          scores_exp = scores.copy()
  
          #(TODO: vectorize the inner construction here)   
          for t in range(0,h):
              new_value1 = theta_t_exp[-1] + theta_exp[-1] + t_params[0]*scores_exp[-1]
              new_value2 = theta_t_exp[-1] + t_params[1]*scores_exp[-1]
              if self.model_name2 == "Exponential":
                  Y_exp = np.append(Y_exp, [1.0/self.link(new_value1)])
              else:
                  Y_exp = np.append(Y_exp, [self.link(new_value1)])
              theta_exp = np.append(theta_exp, [new_value1]) # For indexing consistency
              theta_t_exp = np.append(theta_t_exp, [new_value2])
              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 local level
  
          theta_t : np.array
              The past local linear trend
  
          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
  
          Returns
          ----------
          Y_exp : np.array
              Vector of past values and predictions