code: def build_err_msg(ds, dt_s, parameter_str):
      dt = dt_s_tup_to_string(dt_s)
      seasons = dt_s[1]
      err_msg = "Error in " + parameter_str + " for:\n"
      err_msg += "- Dataset: " + ds.__str__() + "\n"
      err_msg += "- Deterministic terms: "
      err_msg += dt_s[0] if dt != "n" else "no det. terms"
      if seasons > 0:
          err_msg += ", seasons: " + str(seasons)
      return err_msg
  
imports: import numpy
  from numpy.testing import assert_, assert_allclose, assert_array_equal, assert_raises, assert_raises_regex
  import pytest
  import statsmodels.datasets.interest_inflation.data
  from statsmodels.tools.testing import assert_equal
  from statsmodels.tsa.vector_ar.tests.JMulTi_results.parse_jmulti_vecm_output import dt_s_tup_to_string, load_results_jmulti, sublists
  from statsmodels.tsa.vector_ar.util import seasonal_dummies
  from statsmodels.tsa.vector_ar.var_model import VARProcess
  from statsmodels.tsa.vector_ar.vecm import VECM, select_coint_rank, select_order
label_desc: Use image node_id 5 for calling a global function with example usage: build_err_msg(ds, dt_s, parameter_str) and returns: err_msg