code: def test_ets_map_seasonal_fit(make_weekly_data, n_bootstrap_draws):
      train_df, test_df, coef = make_weekly_data
  
      ets = ETS(
          response_col="response",
          date_col="week",
          seasonality=52,
          verbose=False,
          estimator="stan-map",
          n_bootstrap_draws=n_bootstrap_draws,
      )
  
      ets.fit(train_df)
      init_values = ets._model.get_init_values()
      assert init_values["init_sea"].shape == (51,)
  
      predict_df = ets.predict(test_df)
  
      # if n_bootstrap_draws provided then produce prediction range
      if n_bootstrap_draws is not None and n_bootstrap_draws > 0:
          expected_columns = [
              "week",
              "prediction_5",
              "prediction",
              "prediction_95",
          ]
      else:
          expected_columns = ["week", "prediction"]
      expected_shape = (51, len(expected_columns))
      expected_num_parameters = (
          len(ets._model.get_model_param_names()) + 1
      )
  
      assert predict_df.shape == expected_shape
      assert predict_df.columns.tolist() == expected_columns
      p = ets.get_posterior_samples()
      assert len(p.keys()) == expected_num_parameters
  
file_path: orbit/tests/orbit/models/test_ets.py
imports: import pytest
  import numpy
  from copy import copy
  from orbit.models import ETS
  from orbit.constants.constants import PredictionKeys
label_desc: Use image node_id 4 for calling a global function with example usage: test_ets_map_seasonal_fit(make_weekly_data, n_bootstrap_draws) without return types