code: def create_stack(self, stack_id):
      stack_type = self.stack_types[stack_id]
      blocks = torch.nn.ModuleList()
      for block_id in range(self.nb_blocks_per_stack):
          block_init = NBeatsNet._select_block(stack_type)
          if self.share_weights_in_stack and block_id != 0:
              block = blocks[
                  -1
              ]  # pick up the last one when we share weights.
          else:
              block = block_init(
                  self.hidden_layer_units,
                  self.thetas_dim[stack_id],
                  self.past_seq_len,
                  self.future_seq_len,
                  self.nb_harmonics,
              )
          blocks.append(block)
      return blocks
  
imports: import pickle
  import random
  from time import time
  from typing import Union
  import numpy
  import torch
  from torch import nn, optim
  from torch.nn import functional
  from torch.nn.functional import mse_loss, l1_loss, binary_cross_entropy, cross_entropy
  from torch.optim import Optimizer
  from .utils import PYTORCH_REGRESSION_LOSS_MAP
  from pytorch_lightning import seed_everything
label_desc: Use image node_id 2 for calling the NBeatsNet obj's underlying member method code with example usage: obj.create_stack(stack_id) and returns: blocks