code: def test_dlt_map_reproducibility(make_weekly_data, seasonality):
      train_df, test_df, coef = make_weekly_data
  
      dlt1 = DLT(
          response_col="response",
          date_col="week",
          prediction_percentiles=[5, 95],
          seasonality=seasonality,
          estimator="stan-map",
      )
  
      # first fit and predict
      dlt1.fit(train_df)
      posteriors1 = copy(dlt1._point_posteriors["map"])
      prediction1 = dlt1.predict(test_df)
  
      # second fit and predict
      # note a new instance must be created to reset the seed
      # note both fit and predict contain random generation processes
      dlt2 = DLT(
          response_col="response",
          date_col="week",
          prediction_percentiles=[5, 95],
          seasonality=seasonality,
          estimator="stan-map",
      )
  
      dlt2.fit(train_df)
      posteriors2 = copy(dlt2._point_posteriors["map"])
      prediction2 = dlt2.predict(test_df)
  
      # assert same posterior keys
      assert set(posteriors1.keys()) == set(posteriors2.keys())
  
      # assert posterior draws are reproducible
      for k, v in posteriors1.items():
          assert np.allclose(posteriors1[k], posteriors2[k])
  
      # assert prediction is reproducible
      assert np.allclose(
          prediction1["prediction"].values,
          prediction2["prediction"].values,
      )
  
imports: from copy import copy
  import pytest
  import numpy
  from orbit.models import DLT
  from orbit.constants.constants import PredictionKeys
  from orbit.exceptions import ModelException, PredictionException
label_desc: Use image node_id 14 for calling a global function with example usage: test_dlt_map_reproducibility(make_weekly_data, seasonality) without return types