code: def test_dlt_full_reproducibility(
      make_weekly_data, estimator, regressor_signs, seasonality
  ):
      train_df, test_df, coef = make_weekly_data
  
      dlt_first = DLT(
          response_col="response",
          date_col="week",
          regressor_col=train_df.columns.tolist()[2:],
          regressor_sign=regressor_signs,
          prediction_percentiles=[5, 95],
          seasonality=seasonality,
          num_warmup=50,
          verbose=False,
          estimator=estimator,
      )
  
      # first fit and predict
      dlt_first.fit(train_df)
      posteriors_first = copy(dlt_first._posterior_samples)
      predict_df_first = dlt_first.predict(test_df)
      regression_out_first = dlt_first.get_regression_coefs()
  
      # second fit and predict
      # note a new instance must be created to reset the seed
      # note both fit and predict contain random generation processes
      dlt_second = DLT(
          response_col="response",
          date_col="week",
          regressor_col=train_df.columns.tolist()[2:],
          regressor_sign=regressor_signs,
          prediction_percentiles=[5, 95],
          seasonality=seasonality,
          num_warmup=50,
          verbose=False,
          estimator=estimator,
      )
  
      dlt_second.fit(train_df)
      posteriors_second = copy(dlt_second._posterior_samples)
      predict_df_second = dlt_second.predict(test_df)
      regression_out_second = dlt_second.get_regression_coefs()
  
      # assert same posterior keys
      assert set(posteriors_first.keys()) == set(
          posteriors_second.keys()
      )
  
      # assert posterior draws are reproducible
      for k, v in posteriors_first.items():
          assert np.allclose(posteriors_first[k], posteriors_second[k])
  
      # assert identical regression columns
      # this is also checked in posterior samples, but an extra layer just in case
      # since this one very commonly retrieved by end users
      assert regression_out_first.equals(regression_out_second)
  
      # assert prediction is reproducible
      assert predict_df_first.equals(predict_df_second)
  
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 13 for calling a global function with example usage: test_dlt_full_reproducibility(make_weekly_data, estimator, regressor_signs, seasonality) without return types