class_docstr: Construct a DeepState estimator.
  
  This implements the deep state space model described in
  [RSG+18]_.
  
  Parameters
  ----------
  freq
      Frequency of the data to train on and predict
  prediction_length
      Length of the prediction horizon
  cardinality
      Number of values of each categorical feature.
      This must be set by default unless ``use_feat_static_cat``
      is set to `False` explicitly (which is NOT recommended).
  add_trend
      Flag to indicate whether to include trend component in the
      state space model
  past_length
      This is the length of the training time series;
      i.e., number of steps to unroll the RNN for before computing
      predictions.
      Set this to (at most) the length of the shortest time series in the
      dataset.
      (default: None, in which case the training length is set such that
      at least
      `num_seasons_to_train` seasons are included in the training.
      See `num_seasons_to_train`)
  num_periods_to_train
      (Used only when `past_length` is not set)
      Number of periods to include in the training time series. (default: 4)
      Here period corresponds to the longest cycle one can expect given
      the granularity of the time series.
      See: https://stats.stackexchange.com/questions/120806/frequency
      -value-for-seconds-minutes-intervals-data-in-r
  trainer
      Trainer object to be used (default: Trainer())
  num_layers
      Number of RNN layers (default: 2)
  num_cells
      Number of RNN cells for each layer (default: 40)
  cell_type
      Type of recurrent cells to use (available: 'lstm' or 'gru';
      default: 'lstm')
  num_parallel_samples
      Number of evaluation samples per time series to increase parallelism
      during inference.
      This is a model optimization that does not affect the accuracy (
      default: 100).
  dropout_rate
      Dropout regularization parameter (default: 0.1)
  use_feat_dynamic_real
      Whether to use the ``feat_dynamic_real`` field from the data
      (default: False)
  use_feat_static_cat
      Whether to use the ``feat_static_cat`` field from the data
      (default: True)
  embedding_dimension
      Dimension of the embeddings for categorical features
      (default: [min(50, (cat+1)//2) for cat in cardinality])
  scaling
      Whether to automatically scale the target values (default: true)
  time_features
      Time features to use as inputs of the RNN (default: None, in which
      case these are automatically determined based on freq)
  noise_std_bounds
      Lower and upper bounds for the standard deviation of the observation
      noise
  prior_cov_bounds
      Lower and upper bounds for the diagonal of the prior covariance matrix
  innovation_bounds
      Lower and upper bounds for the standard deviation of the observation
      noise
  batch_size
      The size of the batches to be used training and prediction.
code: def create_predictor(
      self, transformation: Transformation, trained_network: HybridBlock
  ) -> Predictor:
      prediction_splitter = self._create_instance_splitter("test")
  
      prediction_network = DeepStatePredictionNetwork(
          num_layers=self.num_layers,
          num_cells=self.num_cells,
          cell_type=self.cell_type,
          past_length=self.past_length,
          prediction_length=self.prediction_length,
          issm=self.issm,
          dropout_rate=self.dropout_rate,
          cardinality=self.cardinality,
          embedding_dimension=self.embedding_dimension,
          scaling=self.scaling,
          num_parallel_samples=self.num_parallel_samples,
          noise_std_bounds=self.noise_std_bounds,
          prior_cov_bounds=self.prior_cov_bounds,
          innovation_bounds=self.innovation_bounds,
          params=trained_network.collect_params(),
      )
  
      copy_parameters(trained_network, prediction_network)
  
      return RepresentableBlockPredictor(
          input_transform=transformation + prediction_splitter,
          prediction_net=prediction_network,
          batch_size=self.batch_size,
          prediction_length=self.prediction_length,
          ctx=self.trainer.ctx,
      )
  
imports: from functools import partial
  from typing import List, Optional
  import numpy
  from mxnet.gluon import HybridBlock
  from pandas.tseries.frequencies import to_offset
  from gluonts.core.component import validated
  from gluonts.dataset.common import Dataset
  from gluonts.dataset.field_names import FieldName
  from gluonts.dataset.loader import DataLoader, TrainDataLoader, ValidationDataLoader
  from gluonts.model.predictor import Predictor
  from gluonts.mx.batchify import batchify
  from gluonts.mx.distribution.lds import ParameterBounds
  from gluonts.mx.model.estimator import GluonEstimator
  from gluonts.mx.model.predictor import RepresentableBlockPredictor
  from gluonts.mx.trainer import Trainer
  from gluonts.mx.util import copy_parameters, get_hybrid_forward_input_names
  from gluonts.time_feature import TimeFeature, norm_freq_str, time_features_from_frequency_str
  from gluonts.transform import AddAgeFeature, AddObservedValuesIndicator, AddTimeFeatures, AsNumpyArray, CanonicalInstanceSplitter, Chain, ExpandDimArray, RemoveFields, SelectFields, SetField, TestSplitSampler, Transformation, VstackFeatures
  from .issm import ISSM, CompositeISSM
  from ._network import DeepStatePredictionNetwork, DeepStateTrainingNetwork
label_desc: Use image node_id 7 for calling the DeepStateEstimator obj's underlying member method code with example usage: obj.create_predictor(transformation, trained_network) and returns: RepresentableBlockPredictor