class_docstr: Representation of a response term in a PyMC model.
  
  Parameters
  ----------
  term : bambi.terms.ResponseTerm
      The response term as represented in Bambi.
  family : bambi.famlies.Family
      The model family.
class_docstr_tok: ["Representation","of","a","response","term","in","a","PyMC","model",".","Parameters","--","--","--","--","--","term",":","bambi.terms.ResponseTerm","The","response","term","as","represented","in","Bambi",".","family",":","bambi.famlies.Family","The","model","family","."]
docstr: Create and return the response distribution for the PyMC model.
  
  Parameters
  ----------
  pymc_backend : bambi.backend.PyMCModel
      The object with all the backend information
  bmb_model : bambi.Model
      The Bambi model instance
  
  Returns
  -------
  dist : pm.Distribution
      The response distribution
docstr_tok: ["Create","and","return","the","response","distribution","for","the","PyMC","model",".","Parameters","--","--","--","--","--","pymc_backend",":","bambi.backend.PyMCModel","The","object","with","all","the","backend","information","bmb_model",":","bambi.Model","The","Bambi","model","instance","Returns","--","--","--","-","dist",":","pm.Distribution","The","response","distribution"]
code: def build(self, pymc_backend, bmb_model):
      """Create and return the response distribution for the PyMC model.
  
      Parameters
      ----------
      pymc_backend : bambi.backend.PyMCModel
          The object with all the backend information
      bmb_model : bambi.Model
          The Bambi model instance
  
      Returns
      -------
      dist : pm.Distribution
          The response distribution
      """
      data = np.squeeze(self.term.data)
      parent = self.family.likelihood.parent
  
      # Auxiliary parameters
      kwargs = {}
  
      # Constant parameters. No link function is used.
      for name, component in pymc_backend.constant_components.items():
          kwargs[name] = component.output
  
      # Distributional parameters. A link funciton is used.
      dims = (f"{self.name}_obs",)
      for (
          name,
          component,
      ) in pymc_backend.distributional_components.items():
          bmb_component = bmb_model.components[name]
          if bmb_component.response_term:  # The response is added later
              continue
          aliased_name = (
              bmb_component.alias
              if bmb_component.alias
              else bmb_component.response_name
          )
          linkinv = get_linkinv(
              self.family.link[name], pymc_backend.INVLINKS
          )
          kwargs[name] = pm.Deterministic(
              aliased_name, linkinv(component.output), dims=dims
          )
  
      # Add observed and dims
      kwargs["observed"] = data
      kwargs["dims"] = dims
  
      # The linear predictor for the parent parameter (usually the mean)
      eta = pymc_backend.distributional_components[
          self.term.name
      ].output
  
      if hasattr(self.family, "transform_backend_eta"):
          eta = self.family.transform_backend_eta(eta, kwargs)
  
      # Take the inverse link function that maps from linear predictor to the parent of likelihood
      linkinv = get_linkinv(
          self.family.link[parent], pymc_backend.INVLINKS
      )
  
      # Add parent parameter after the applying the linkinv transformation
      kwargs[parent] = linkinv(eta)
  
      # Build the response distribution
      dist = self.build_response_distribution(kwargs, pymc_backend)
  
      return dist
  
imports: import inspect
  import numpy
  import pymc
  import pytensor.tensor
  from bambi.backend.utils import get_distribution_from_likelihood, get_distribution_from_prior, get_linkinv, has_hyperprior, make_weighted_distribution, GP_KERNELS
  from bambi.families.multivariate import MultivariateFamily, Multinomial, DirichletMultinomial
  from bambi.families.univariate import Categorical
  from bambi.priors import Prior
  from bambi.utils import get_aliased_name
label_desc: Use image node_id 2 for calling the ResponseTerm obj's underlying member method code with example usage: obj.build(pymc_backend, bmb_model) and returns: dist