code: def test_bad_links():
      """Passes names of links that are not suitable for the family."""
      rng = np.random.default_rng(121195)
      data = pd.DataFrame(
          {
              "g": rng.choice([0, 1], size=100),
              "y": rng.integers(3, 10, size=100),
              "x": rng.integers(3, 10, size=100),
          }
      )
      FAMILIES = {
          "bernoulli": ["inverse", "inverse_squared", "log"],
          "beta": ["inverse", "inverse_squared", "log"],
          "gamma": ["logit", "probit", "cloglog"],
          "gaussian": ["logit", "probit", "cloglog"],
          "negativebinomial": [
              "logit",
              "probit",
              "inverse",
              "inverse_squared",
          ],
          "poisson": [
              "logit",
              "probit",
              "cloglog",
              "inverse",
              "inverse_squared",
          ],
          "vonmises": ["logit", "probit", "cloglog"],
          "wald": ["logit", "probit", "cloglog"],
      }
  
      for family, links in FAMILIES.items():
          for link in links:
              with pytest.raises(ValueError):
                  if family == "bernoulli":
                      formula = "g ~ x"
                  else:
                      formula = "y ~ x"
                  bmb.Model(formula, data, family=family, link=link)
  
imports: import logging
  from functools import reduce
  from operator import add
  from os.path import dirname, join
  import arviz
  import numpy
  import pandas
  import pymc
  import pytest
  from formulae import design_matrices
  import bambi
  from bambi.terms import CommonTerm, GroupSpecificTerm
label_desc: Use image node_id 23 for calling a global function with example usage: test_bad_links() without return types