class_docstr: An `Estimator` that computes the mean targets in the training data, in the
  trailing `prediction_length` observations, and produces a
  `ConstantPredictor` that always predicts such mean value.
  
  Parameters
  ----------
  prediction_length
      Prediction horizon.
  num_samples
      Number of samples to include in the forecasts. Not that the samples
      produced by this predictor will all be identical.
code: def train(
      self,
      training_data: Dataset,
      validation_dataset: Optional[Dataset] = None,
  ) -> ConstantPredictor:
      contexts = np.array(
          [
              item["target"][-self.prediction_length :]
              for item in training_data
          ]
      )
  
      samples = np.broadcast_to(
          array=contexts.mean(axis=0),
          shape=(self.num_samples, self.prediction_length),
      )
  
      return ConstantPredictor(samples=samples)
  
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 2 for calling the MeanEstimator obj's underlying member method code with example usage: obj.train(training_data, validation_dataset) and returns: ConstantPredictor