code: def test_lgt_map_fit(make_weekly_data, seasonality, estimator):
      train_df, test_df, coef = make_weekly_data
  
      lgt = LGT(
          response_col="response",
          date_col="week",
          seasonality=seasonality,
          verbose=False,
          estimator=estimator,
      )
  
      lgt.fit(train_df)
      init_values = lgt._model.get_init_values()
      if seasonality:
          assert init_values["init_sea"].shape == (51,)
      else:
          assert init_values is None
  
      predict_df = lgt.predict(test_df)
  
      expected_num_parameters = (
          len(lgt._model.get_model_param_names()) + 1
      )
      expected_columns = ["week", "prediction"]
      expected_shape = (51, len(expected_columns))
      assert predict_df.shape == expected_shape
      assert predict_df.columns.tolist() == expected_columns
      assert len(lgt._posterior_samples) == expected_num_parameters
  
imports: from copy import copy
  import pytest
  import numpy
  from orbit.models import LGT
  from orbit.constants.constants import PredictionKeys
label_desc: Use image node_id 4 for calling a global function with example usage: test_lgt_map_fit(make_weekly_data, seasonality, estimator) without return types