docstr: Add group-specific (random or varying) terms to the PyMC model.
  
  We have linear predictors of the form 'X @ b + Z @ u'.
  This creates the 'u' parameter vector in PyMC, computes `Z @ u`, and adds it to
  ``self.output``.
docstr_tok: ["Add","group-specific","(","random","or","varying",")","terms","to","the","PyMC","model",".","We","have","linear","predictors","of","the","form","'","X","@","b","+","Z","@","u","'",".","This","creates","the","'","u","'","parameter","vector","in","PyMC",",","computes","`","Z","@","u","`",",","and","adds","it","to","``","self.output","``","."]
code: def build_group_specific_terms(self, pymc_backend, bmb_model):
      """Add group-specific (random or varying) terms to the PyMC model.
  
      We have linear predictors of the form 'X @ b + Z @ u'.
      This creates the 'u' parameter vector in PyMC, computes `Z @ u`, and adds it to
      ``self.output``.
      """
      for term in self.component.group_specific_terms.values():
          group_specific_term = GroupSpecificTerm(
              term, bmb_model.noncentered
          )
  
          # Add coords
          for name, values in group_specific_term.coords.items():
              if name not in pymc_backend.model.coords:
                  pymc_backend.model.add_coords({name: values})
  
          # Build
          coef, predictor = group_specific_term.build(bmb_model)
  
          # Add to the linear predictor
          # The loop through predictor columns is not the most beautiful alternative.
          # But it's the fastest. Doing matrix multiplication, pm.math.dot(data, coef), is slower.
          if predictor.ndim > 1:
              for col in range(predictor.shape[1]):
                  self.output += coef[:, col] * predictor[:, col]
          elif isinstance(
              bmb_model.family, (MultivariateFamily, Categorical)
          ):
              self.output += coef * predictor[:, np.newaxis]
          else:
              self.output += coef * predictor
  
file_path: bambi/bambi/backend/model_components.py
imports: import numpy
  from pytensor import tensor
  from bambi.backend.terms import CommonTerm, GroupSpecificTerm, HSGPTerm, InterceptTerm, ResponseTerm
  from bambi.backend.utils import get_distribution_from_prior
  from bambi.families.multivariate import MultivariateFamily
  from bambi.families.univariate import Categorical, Cumulative, StoppingRatio
  from bambi.utils import get_aliased_name
label_desc: Use image node_id 7 for calling the DistributionalComponent obj's underlying member method code with example usage: obj.build_group_specific_terms(pymc_backend, bmb_model) without return types