code: def get_model_terms(model: Model) -> dict:
      """
      Loops through the distributional components of a bambi model and
      returns a dictionary of terms.
      """
      terms = {}
      for component in model.distributional_components.values():
          if component.design.common:
              terms.update(component.design.common.terms)
  
          if component.design.group:
              terms.update(component.design.group.terms)
  
      return terms
  
imports: from dataclasses import dataclass, field
  from typing import Union
  import numpy
  from formulae.terms.call import Call
  import pandas
  import xarray
  from bambi import Model
  from bambi.utils import listify
  from bambi.interpret.logs import log_interpret_defaults
label_desc: Use image node_id 2 for calling a global function with example usage: get_model_terms(model) and returns: terms