class_docstr: Distributional model components
  
  Parameters
  ----------
  design : formulae.DesignMatrices
      The object with all the required design matrices and information about the model terms.
  priors : dict
      A dictionary where keys are term names and values are their priors.
  response_name : str
      The name of the response or target. If ``response_kind`` is ``"data"``, it's the name of
      the response variable. If ``response_kind`` is ``"param"`` it's the name of the parameter.
      An example of the first could be "Reaction" and an example of the latter could be "sigma"
      or "kappa".
  response_kind : str
      Specifies whether the distributional component models the response (``"data"``) or an
      auxiliary parameter (``"param"``). When ``"data"`` this is actually modeling the "parent"
      parameter of the family.
  spec : bambi.Model
      The Bambi model
code: def predict(
      self,
      idata,
      data=None,
      include_group_specific=True,
      hsgp_dict=None,
      sample_new_groups=False,
  ):
      linear_predictor = 0
      posterior = idata.posterior
      in_sample = data is None
      family = self.spec.family
  
      # Prepare dims objects
      response_name = get_aliased_name(
          self.spec.response_component.response_term
      )
      response_dim = response_name + "_obs"
      linear_predictor_dims = ("chain", "draw", response_dim)
      to_stack_dims = ("chain", "draw")
      design_matrix_dims = (response_dim, "__variables__")
  
      # These families drop a level in the response
      if isinstance(
          self.spec.family,
          (multivariate.Multinomial, univariate.Categorical),
      ):
          response_levels_dim = response_name + "_reduced_dim"
          to_stack_dims = to_stack_dims + (response_levels_dim,)
          linear_predictor_dims = linear_predictor_dims + (
              response_levels_dim,
          )
      # These families DON'T drop any level in the response
      elif isinstance(
          self.spec.family, multivariate.MultivariateFamily
      ):
          response_levels_dim = response_name + "_dim"
          to_stack_dims = to_stack_dims + (response_levels_dim,)
          linear_predictor_dims = linear_predictor_dims + (
              response_levels_dim,
          )
  
      if self.design.common:
          linear_predictor += self.predict_common(
              posterior,
              data,
              in_sample,
              to_stack_dims,
              design_matrix_dims,
              hsgp_dict,
          )
  
      if self.design.group and include_group_specific:
          linear_predictor += self.predict_group_specific(
              posterior,
              data,
              in_sample,
              to_stack_dims,
              design_matrix_dims,
              sample_new_groups,
          )
  
      # Sort dimensions
      linear_predictor = linear_predictor.transpose(
          *linear_predictor_dims
      )
  
      # Add coordinates for the observation number
      obs_n = len(linear_predictor[response_dim])
      linear_predictor = linear_predictor.assign_coords(
          {response_dim: list(range(obs_n))}
      )
  
      # Handle more special cases
      if hasattr(family, "transform_linear_predictor"):
          linear_predictor = family.transform_linear_predictor(
              self.spec, linear_predictor, posterior
          )
  
      if self.response_kind == "data":
          linkinv = family.link[family.likelihood.parent].linkinv
      else:
          linkinv = family.link[self.response_name].linkinv
  
      invlink_kwargs = getattr(family, "INVLINK_KWARGS", {})
      response = xr.apply_ufunc(
          linkinv, linear_predictor, kwargs=invlink_kwargs
      )
  
      if hasattr(family, "transform_coords"):
          response = family.transform_coords(self.spec, response)
  
      if hasattr(family, "transform_mean"):
          response = family.transform_mean(self.spec, response)
  
      return response
  
imports: import formulae
  import numpy
  import xarray
  from bambi.defaults import get_default_prior
  from bambi.families import univariate, multivariate
  from bambi.priors import Prior
  from bambi.terms import CommonTerm, GroupSpecificTerm, HSGPTerm, OffsetTerm, ResponseTerm
  from bambi.utils import get_aliased_name, is_hsgp_term
label_desc: Use image node_id 8 for calling the DistributionalComponent obj's underlying member method code with example usage: obj.predict(idata, data, include_group_specific, hsgp_dict, sample_new_groups) and returns: response