code: def create_training_network(
      self, device: torch.device
  ) -> NBEATSTrainingNetwork:
      return NBEATSTrainingNetwork(
          prediction_length=self.prediction_length,
          context_length=self.context_length,
          num_stacks=self.num_stacks,
          widths=self.widths,
          num_blocks=self.num_blocks,
          num_block_layers=self.num_block_layers,
          expansion_coefficient_lengths=self.expansion_coefficient_lengths,
          sharing=self.sharing,
          stack_types=self.stack_types,
          loss_function=self.loss_function,
          freq=self.freq,
      ).to(device)
  
file_path: gluonts/src/gluonts/nursery/robust-mts-attack/pts/model/n_beats/n_beats_estimator.py
imports: from typing import List, Optional
  import torch
  import torch.nn
  from gluonts.core.component import validated
  from gluonts.dataset.field_names import FieldName
  from gluonts.model.predictor import Predictor
  from gluonts.torch.model.predictor import PyTorchPredictor
  from gluonts.torch.util import copy_parameters
  from gluonts.transform import InstanceSplitter, ValidationSplitSampler, TestSplitSampler, AddObservedValuesIndicator, Transformation, Chain, RemoveFields, ExpectedNumInstanceSampler
  from pts import Trainer
  from pts.model import PyTorchEstimator
  from pts.model.utils import get_module_forward_input_names
  from .n_beats_network import NBEATSPredictionNetwork, NBEATSTrainingNetwork, VALID_N_BEATS_STACK_TYPES
label_desc: Use image node_id 5 for calling the NBEATSEstimator obj's underlying member method code with example usage: obj.create_training_network(device) and returns: NBEATSTrainingNetwork