code: def test_distributional_model(my_data):
      formula = bmb.Formula("y ~ x", "sigma ~ x")
      model = bmb.Model(formula, my_data)
      idata = model.fit(tune=100, draws=100)
      model.predict(idata)
  
      assert list(idata.posterior.coords) == ["chain", "draw", "y_obs"]
      assert set(idata.posterior.data_vars) == {
          "Intercept",
          "x",
          "sigma_Intercept",
          "sigma_x",
          "y_sigma",
          "y_mean",
      }
      assert list(idata.posterior["y_mean"].coords) == [
          "chain",
          "draw",
          "y_obs",
      ]
      assert list(idata.posterior["y_sigma"].coords) == [
          "chain",
          "draw",
          "y_obs",
      ]
  
      aliases = {
          "y": {"Intercept": "y_a", "x": "y_b", "y": "response"},
          "sigma": {
              "Intercept": "sigma_a",
              "x": "sigma_b",
              "sigma": "s",
          },
      }
      model.set_alias(aliases)
      idata = model.fit(tune=100, draws=100)
      model.predict(idata)
  
      assert list(idata.posterior.coords) == [
          "chain",
          "draw",
          "response_obs",
      ]
      assert set(idata.posterior.data_vars) == {
          "response_mean",
          "y_a",
          "y_b",
          "sigma_a",
          "sigma_b",
          "s",
      }
      assert list(idata.posterior["response_mean"].coords) == [
          "chain",
          "draw",
          "response_obs",
      ]
      assert list(idata.posterior["s"].coords) == [
          "chain",
          "draw",
          "response_obs",
      ]
  
file_path: bambi/tests/test_aliases.py
imports: import pytest
  import bambi
  import numpy
  import pandas
label_desc: Use image node_id 5 for calling a global function with example usage: test_distributional_model(my_data) without return types