code: def test_L_good_shape(
      data_1d_multiple_groups, data_2d_multiple_groups
  ):
      L = [[10], [12], [15]]  # (groups_n, variables_n)
      model = bmb.Model(
          "y ~ 0 + hsgp(x2, by=fac, L=L, m=10)", data_1d_multiple_groups
      )
      term = model.response_component.terms[
          "hsgp(x2, by=fac, L=L, m=10)"
      ]
      assert (term.L == np.array(L)).all()
  
      L = [10, 12]  # (variables_n, )
      model = bmb.Model(
          "outcome ~ 0 + hsgp(x, y, by=group, L=L, m=10)",
          data_2d_multiple_groups,
      )
      term = model.response_component.terms[
          "hsgp(x, y, by=group, L=L, m=10)"
      ]
      assert term.L.shape == (3, 2)
      assert (term.L == np.tile(np.array(L), (3, 1))).all()
  
      L = [[10, 12], [15, 13], [16, 14]]  # (groups_n, variables_n)
      model = bmb.Model(
          "outcome ~ 0 + hsgp(x, y, by=group, L=L, m=10)",
          data_2d_multiple_groups,
      )
      term = model.response_component.terms[
          "hsgp(x, y, by=group, L=L, m=10)"
      ]
      assert term.L.shape == (3, 2)
      assert (term.L == np.array(L)).all()
  
imports: import pathlib
  import re
  import bambi
  import numpy
  import pandas
  import pytest
label_desc: Use image node_id 13 for calling a global function with example usage: test_L_good_shape(data_1d_multiple_groups, data_2d_multiple_groups) without return types