code: def forward(self, x):
      # One forecast vector per parameter in the distribution
      stack_forecast = torch.zeros(
          x.shape[0],
          self.target_length,
          self.nr_params,
          device=x.device,
          dtype=x.dtype,
      )
  
      for block in self.blocks_list:
          # pass input through block
          x_hat, y_hat = block(x)
  
          # add block forecast to stack forecast
          stack_forecast = stack_forecast + y_hat
  
          # subtract backcast from input to produce residual
          x = x - x_hat
  
      stack_residual = x
  
      return stack_residual, stack_forecast
  
imports: from enum import Enum
  from typing import List, NewType, Tuple, Union
  import numpy
  import torch
  import torch.nn
  from darts.logging import get_logger, raise_if_not, raise_log
  from darts.models.forecasting.pl_forecasting_module import PLPastCovariatesModule, io_processor
  from darts.models.forecasting.torch_forecasting_model import PastCovariatesTorchModel
  from darts.utils.torch import MonteCarloDropout
label_desc: Use image node_id 2 for calling the _Stack obj's underlying member method code with example usage: obj.forward(x) and returns: stack_residual,  stack_forecast