code: def test_c_bad_shape(
      data_1d_multiple_groups, data_2d_multiple_groups
  ):
      match = re.escape("1D sequences must be of shape (variables_n, )")
      with pytest.raises(ValueError, match=match):
          c = [2, 1.5, 1.4]  # wrong because it's of shape (groups_n, )
          bmb.Model(
              "y ~ 0 + hsgp(x2, by=fac, c=c, m=10)",
              data_1d_multiple_groups,
          )
  
      match = re.escape(
          "2D sequences must be of shape (groups_n, variables_n)"
      )
      with pytest.raises(ValueError, match=match):
          c = [
              [2],
              [1.5],
          ]  # wrong because it's of shape (groups_n - 1, variables_n)
          bmb.Model(
              "y ~ 0 + hsgp(x2, by=fac, c=c, m=10)",
              data_1d_multiple_groups,
          )
  
      match = re.escape("1D sequences must be of shape (variables_n, )")
      with pytest.raises(ValueError, match=match):
          c = [2]  # wrong because it's of shape (variables_n - 1,)
          bmb.Model(
              "outcome ~ 0 + hsgp(x, y, c=c, m=10)",
              data_2d_multiple_groups,
          )
  
      match = re.escape(
          "2D sequences must be of shape (groups_n, variables_n)"
      )
      with pytest.raises(ValueError, match=match):
          c = [
              [2, 1.5],
              [1.8, 1.6],
          ]  # wrong because it's of shape (variables_n - 1, groups_n - 1)
          bmb.Model(
              "outcome ~ 0 + hsgp(x, y, by=group, c=c, m=10)",
              data_2d_multiple_groups,
          )
  
imports: import pathlib
  import re
  import bambi
  import numpy
  import pandas
  import pytest
label_desc: Use image node_id 9 for calling a global function with example usage: test_c_bad_shape(data_1d_multiple_groups, data_2d_multiple_groups) without return types