class_docstr: An ensemble predictor for N-BEATS. Calling '.predict' will result in::
  
      |predictors|x|dataset|
  
  predictions, if aggregation_method is 'none', otherwise in::
  
      |dataset|
  
  Parameters
  ----------
  prediction_length
      Prediction horizon.
  predictors
      The list of 'RepresentableBlockPredictor' that the ensemble consists
      of.
  aggregation_method
      The method by which to aggregate the individual predictions of the
      models. Either 'median', 'mean' or 'none', in which case no aggregation
      happens. Default is 'median'.
code: def serialize(self, path: Path) -> None:
      # serialize some metadata
      super().serialize(path)
  
      # basically save each predictor in its own sub-folder
      num_digits = len(str(len(self.predictors)))
      for index, predictor in enumerate(self.predictors):
          composite_path = (
              path / f"predictor_{str(index).zfill(num_digits)}"
          )
          os.makedirs(str(composite_path))
          predictor.serialize(composite_path)
  
      # serialize all remaining constructor parameters
      with (path / "parameters.json").open("w") as fp:
          parameters = dict(
              prediction_length=self.prediction_length,
              aggregation_method=self.aggregation_method,
              num_predictors=len(self.predictors),
          )
          print(dump_json(parameters), file=fp)
  
imports: import copy
  import logging
  import os
  from itertools import product
  from pathlib import Path
  from typing import Iterator, List, Optional
  import mxnet
  import numpy
  from gluonts.core import fqname_for
  from gluonts.core.component import from_hyperparameters, validated
  from gluonts.core.serde import dump_json, load_json
  from gluonts.dataset.common import Dataset
  from gluonts.dataset.field_names import FieldName
  from gluonts.dataset.loader import DataBatch
  from gluonts.exceptions import GluonTSHyperparametersError
  from gluonts.model import Estimator, Predictor
  from gluonts.model.forecast import Forecast, SampleForecast
  from gluonts.mx.model.predictor import RepresentableBlockPredictor
  from gluonts.mx.trainer import Trainer
  from gluonts.pydantic import ValidationError
  from ._estimator import NBEATSEstimator
  from ._network import VALID_LOSS_FUNCTIONS
label_desc: Use image node_id 3 for calling the NBEATSEnsemblePredictor obj's underlying member method code with example usage: obj.serialize(path) without return types