code: def create_prediction_network(
      estimator: DeepAREstimator,
  ) -> DeepARPredictionNetwork:
      return DeepARPredictionNetwork(
          num_parallel_samples=estimator.num_parallel_samples,
          num_layers=estimator.num_layers,
          num_cells=estimator.num_cells,
          cell_type=estimator.cell_type,
          history_length=estimator.history_length,
          context_length=estimator.context_length,
          prediction_length=estimator.prediction_length,
          distr_output=estimator.distr_output,
          dropoutcell_type=estimator.dropoutcell_type,
          dropout_rate=estimator.dropout_rate,
          cardinality=estimator.cardinality,
          embedding_dimension=estimator.embedding_dimension,
          lags_seq=estimator.lags_seq,
          scaling=estimator.scaling,
          dtype=estimator.dtype,
          num_imputation_samples=estimator.num_imputation_samples,
          default_scale=estimator.default_scale,
          minimum_scale=estimator.minimum_scale,
          impute_missing_values=estimator.impute_missing_values,
      )
  
imports: from functools import partial
  from typing import Callable, Iterator, List, Optional
  from pathlib import Path
  import mxnet
  import numpy
  from gluonts.core.component import Type, validated
  from gluonts.core.serde import load_json
  from gluonts.dataset.common import DataEntry, Dataset
  from gluonts.dataset.loader import DataBatch, InferenceDataLoader
  from gluonts.model.forecast import Forecast
  from gluonts.model.forecast_generator import ForecastGenerator, SampleForecastGenerator
  from gluonts.mx.batchify import stack
  from gluonts.mx.context import get_mxnet_context
  from gluonts.mx.distribution import DistributionOutput, StudentTOutput
  from gluonts.mx.model.deepar import DeepAREstimator
  from gluonts.mx.model.deepar._network import DeepARPredictionNetwork
  from gluonts.mx.model.predictor import RepresentableBlockPredictor
  from gluonts.mx.trainer import Trainer
  from gluonts.mx.util import import_repr_block
  from gluonts.time_feature import TimeFeature
  from gluonts.transform import InstanceSampler, Transformation
  from gluonts.transform.feature import MissingValueImputation
label_desc: Use image node_id 2 for calling a global function with example usage: create_prediction_network(estimator) and returns: DeepARPredictionNetwork