code: def test_constant_terms():
      rng = np.random.default_rng(121195)
      data = pd.DataFrame(
          {
              "y": rng.normal(size=10),
              "x": rng.choice([1], size=10),
              "z": rng.choice(["A"], size=10),
          }
      )
  
      with pytest.raises(ValueError):
          bmb.Model("y ~ 0 + x", data)
  
      with pytest.raises(ValueError):
          bmb.Model("y ~ 0 + z", data)
  
imports: import logging
  from functools import reduce
  from operator import add
  from os.path import dirname, join
  import arviz
  import numpy
  import pandas
  import pymc
  import pytest
  from formulae import design_matrices
  import bambi
  from bambi.terms import CommonTerm, GroupSpecificTerm
label_desc: Use image node_id 24 for calling a global function with example usage: test_constant_terms() without return types