code: def get_predictions(
      target,
      prediction_length=1,
      context_length=1,
      freq="D",
      start="2020",
  ):
      mp = MovingAveragePredictor(
          prediction_length=prediction_length,
          context_length=context_length,
      )
  
      ds = ListDataset([{"target": target, "start": start}], freq=freq)
      item = next(iter(ds))
      predictions = mp.predict_item(item).mean
  
      return predictions
  
imports: import numpy
  import pytest
  from gluonts.dataset.common import ListDataset
  from gluonts.model.trivial.mean import MovingAveragePredictor
label_desc: Use image node_id 1 for calling a global function with example usage: get_predictions(target, prediction_length, context_length, freq, start) and returns: predictions