code: def test_custom_priors_2d_by_groups_anisotropic(
      data_2d_multiple_groups,
  ):
      priors = {
          "hsgp(x, y, by=group, c=1.5, m=10, share_cov=False, iso=False)": {
              "sigma": bmb.Prior("Exponential", lam=5),
              "ell": bmb.Prior("Exponential", lam=2),
          }
      }
      model = bmb.Model(
          "outcome ~ 0 + hsgp(x, y, by=group, c=1.5, m=10, share_cov=False, iso=False)",
          data_2d_multiple_groups,
          priors=priors,
      )
      model.set_alias(
          {
              "hsgp(x, y, by=group, c=1.5, m=10, share_cov=False, iso=False)": "phi"
          }
      )
      model.build()
  
      weights_rv = model.backend.model["phi_weights_raw"]
      ell_rv = model.backend.model["phi_ell"]
      sigma_rv = model.backend.model["phi_sigma"]
  
      assert weights_rv.eval().shape == (100, 3)  # (10x10, 3)
      assert ell_rv.eval().shape == (2, 3)  # (vars_n, groups_n)
      assert sigma_rv.eval().shape == (3,)  # (groups_n, )
  
      # Weird, but this is how we can check it.
      # PyMC asks for lam but then PyTensor uses 1 / lam
      assert 1 / sigma_rv.owner.inputs[-1].eval() == 5
      assert 1 / ell_rv.owner.inputs[-1].eval() == 2
      assert weights_rv.owner.inputs[-2].eval() == 0  # mu
      assert weights_rv.owner.inputs[-1].eval() == 1
  
imports: import pathlib
  import re
  import bambi
  import numpy
  import pandas
  import pytest
label_desc: Use image node_id 16 for calling a global function with example usage: test_custom_priors_2d_by_groups_anisotropic(data_2d_multiple_groups) without return types