code: def test_m_bad_shape(
      data_1d_multiple_groups, data_2d_multiple_groups
  ):
      match = "'m' must be scalar or a sequence with length equal to the number of variables"
      with pytest.raises(ValueError, match=match):
          m = [12, 5]  # There's one variable, not two
          bmb.Model(
              "y ~ 0 + hsgp(x2, c=2, m=m)", data_1d_multiple_groups
          )
  
      with pytest.raises(ValueError, match=match):
          m = [[12, 5], [10, 6], [11, 7]]  # 'm' can't vary by group
          bmb.Model(
              "y ~ 0 + hsgp(x2, c=2, m=m, by=fac)",
              data_1d_multiple_groups,
          )
  
      with pytest.raises(ValueError, match=match):
          m = [10, 10, 10]  # There are two variables, not three
          bmb.Model(
              "outcome ~ 0 + hsgp(x, y, c=2, m=m)",
              data_2d_multiple_groups,
          )
  
      with pytest.raises(ValueError, match=match):
          m = [[10, 10], [10, 10], [10, 10]]  # 'm' can't vary by group
          bmb.Model(
              "outcome ~ 0 + hsgp(x, y, c=2, m=m, by=group)",
              data_2d_multiple_groups,
          )
  
imports: import pathlib
  import re
  import bambi
  import numpy
  import pandas
  import pytest
label_desc: Use image node_id 8 for calling a global function with example usage: test_m_bad_shape(data_1d_multiple_groups, data_2d_multiple_groups) without return types