code: def test_model_term_classes():
      rng = np.random.default_rng(121195)
      data = pd.DataFrame(
          {
              "y": rng.normal(size=50),
              "x": rng.normal(size=50),
              "s": ["s1"] * 25 + ["s2"] * 25,
              "g": rng.choice(["a", "b", "c"], size=50),
          }
      )
  
      model = bmb.Model("y ~ x*g + (x|s)", data)
  
      assert isinstance(model.response_component.terms["x"], CommonTerm)
      assert isinstance(model.response_component.terms["g"], CommonTerm)
      assert isinstance(
          model.response_component.terms["x:g"], CommonTerm
      )
      assert isinstance(
          model.response_component.terms["1|s"], GroupSpecificTerm
      )
      assert isinstance(
          model.response_component.terms["x|s"], GroupSpecificTerm
      )
  
      # Also check 'categorical' attribute is right
      assert model.response_component.terms["g"].categorical
  
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 15 for calling a global function with example usage: test_model_term_classes() without return types