code: def get_hsgp_attributes(term):
      """Extract HSGP attributes from a model matrix term
  
      Parameters
      ----------
      term : formulae.terms.terms.Term
          The formulae term that creates the HSGP term.
  
      Returns
      -------
      dict
          The attributes that will be passed to pm.gp.HSGP
      """
      names = (
          "m",
          "L",
          "c",
          "by_levels",
          "cov",
          "share_cov",
          "scale",
          "iso",
          "drop_first",
          "centered",
          "mean",
          "variables_n",
          "groups_n",
          "maximum_distance",
      )
      attrs_original = term.components[
          0
      ].call.stateful_transform.__dict__
      attrs = {}
      for name in names:
          attrs[name] = attrs_original[name]
      return attrs
  
imports: from functools import partial
  import numpy
  import formulae.terms
  from bambi.terms.base import BaseTerm, VALID_PRIORS
label_desc: Use image node_id 1 for calling a global function with example usage: get_hsgp_attributes(term) and returns: attrs