class_docstr: A :class:`Predictor` that predicts the samples based on the mean of the
  last `context_length` elements of the input target.
  
  Parameters
  ----------
  context_length
      Length of the target context used to condition the predictions.
  prediction_length
      Length of the prediction horizon.
  num_samples
      Number of samples to use to construct :class:`SampleForecast` objects
      for every prediction.
code: def __init__(
      self,
      prediction_length: int,
      num_samples: int = 100,
      context_length: Optional[int] = None,
  ) -> None:
      super().__init__(prediction_length=prediction_length)
      self.context_length = context_length
      self.num_samples = num_samples
      self.shape = (self.num_samples, self.prediction_length)
  
imports: from typing import Optional
  import numpy
  from gluonts.core.component import validated
  from gluonts.dataset.common import DataEntry, Dataset
  from gluonts.dataset.field_names import FieldName
  from gluonts.dataset.util import forecast_start
  from gluonts.model.estimator import Estimator
  from gluonts.model.forecast import SampleForecast
  from gluonts.model.predictor import RepresentablePredictor
  from gluonts.model.trivial.constant import ConstantPredictor
  from gluonts.pydantic import PositiveInt
label_desc: Use image node_id 1 to create a new MeanPredictor object from inherited base classes: RepresentablePredictor with example: obj = MeanPredictor(prediction_length, num_samples, context_length)