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","."]
code: def robustify_dims(self, pymc_backend, kwargs):
      # It's possible the observed for the response is multidimensional, but there's a single
      # linear predictor because the family is not multivariate.
      # In this case, we add extra dimensions to avoid having shape mismatch between the data
      # and the shape implied by the `dims` we pass.
  
      # Don't do it for the Multinomial families (it's an exception)
      if isinstance(self.family, (Multinomial, DirichletMultinomial)):
          return kwargs
  
      if (
          self.term.is_censored
          or self.term.is_truncated
          or self.term.is_weighted
          or self.term.is_constrained
      ):
          return kwargs
  
      dims, data = kwargs["dims"], kwargs["observed"]
      dims_n = len(dims)
      ndim_diff = data.ndim - dims_n
  
      # TO DO: Test with multinomial regression, shouldn't be added?
      if ndim_diff > 0:
          for i in range(ndim_diff):
              axis = dims_n + i
              name = f"{self.name}_extra_dim_{i}"
              values = np.arange(np.size(data, axis=axis))
              pymc_backend.model.add_coords({name: values})
              dims = dims + (name,)
      kwargs["dims"] = dims
      return kwargs
  
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 5 for calling the ResponseTerm obj's underlying member method code with example usage: obj.robustify_dims(pymc_backend, kwargs) and returns: kwargs, kwargs, kwargs