class_docstr: Implements a deep renewal process estimator designed to forecast
  intermittent time series sampled in discrete time, as described in.
  
  [TWJ19]_.
  
  In short, instead of viewing sparse time series as a univariate stochastic
  process, this estimator transforms a sparse time series [0, 0, 0, 3, 0, 0,
  7] to an interval-size format,[(4, 3), (3, 7)] where each ordered pair
  marks the time since the last positive time step(interval) and the value
  of the positive time step (size). Then, probabilistic prediction is
  performed on this transformed time series, as is customary in the
  intermittent demand literature, e.g., Croston's method.
  
  This construction is a self-modulated marked renewal process in discrete
  time as one assumes the (conditional) distribution of intervals are
  identical.
  
  Parameters
  ----------
  prediction_length
      Length of the prediction horizon
  context_length
      The number of time steps the model will condition on
  num_cells
      Number of hidden units used in the RNN cell (LSTM) and dense layer for
      projection to distribution arguments
  num_layers
      Number of layers in the LSTM
  dropout_rate
      Dropout regularization parameter (default: 0.1)
  trainer
      Trainer object to be used (default: Trainer())
  interval_distr_output
      Distribution output object for the intervals. Must be a distribution
      with support on positive integers, where the first argument
      corresponds to the(conditional) mean.
  size_distr_output
      Distribution output object for the demand sizes. Must be a distribution
      with support on positive integers, where the first argument
      corresponds to the(conditional) mean.
  train_sampler
      Controls the sampling of windows during training.
  validation_sampler
      Controls the sampling of windows during validation.
  batch_size
      The size of the batches to be used training and prediction.
  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)
code: def create_predictor(
      self, transformation: Transformation, trained_network: HybridBlock
  ) -> Predictor:
      prediction_transform = (
          self._create_instance_splitter("test")
          + self._create_post_split_transform()
      )
  
      prediction_network = DeepRenewalPredictionNetwork(
          num_parallel_samples=self.num_parallel_samples,
          context_length=self.context_length,
          prediction_length=self.prediction_length,
          num_cells=self.num_cells,
          num_layers=self.num_layers,
          dropout_rate=self.dropout_rate,
          interval_distr_output=self.interval_distr_output,
          size_distr_output=self.size_distr_output,
      )
  
      copy_parameters(trained_network, prediction_network)
  
      return DeepRenewalProcessPredictor(
          input_transform=transformation + prediction_transform,
          prediction_net=prediction_network,
          batch_size=self.batch_size,
          prediction_length=self.prediction_length,
          ctx=self.trainer.ctx,
          input_names=["past_target", "time_remaining"],
      )
  
imports: from functools import partial
  from typing import Callable, Optional
  from mxnet.gluon import HybridBlock
  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.itertools import Cyclic
  from gluonts.model.predictor import Predictor
  from gluonts.mx.batchify import batchify
  from gluonts.mx.distribution import DistributionOutput, NegativeBinomialOutput
  from gluonts.mx.model.estimator import GluonEstimator
  from gluonts.mx.trainer import Trainer
  from gluonts.mx.util import copy_parameters
  from gluonts.transform import AddObservedValuesIndicator, AsNumpyArray, Chain, ExpectedNumInstanceSampler, InstanceSampler, InstanceSplitter, RenameFields, SelectFields, TestSplitSampler, Transformation, ValidationSplitSampler
  from gluonts.transform.convert import SwapAxes, ToIntervalSizeFormat
  from gluonts.transform.feature import CountTrailingZeros
  from ._network import DeepRenewalPredictionNetwork, DeepRenewalTrainingNetwork
  from ._predictor import DeepRenewalProcessPredictor
  from ._transform import AddAxisLength
label_desc: Use image node_id 9 for calling the DeepRenewalProcessEstimator obj's underlying member method code with example usage: obj.create_predictor(transformation, trained_network) and returns: DeepRenewalProcessPredictor