code: def test_custom_link():
      rng = np.random.default_rng(121195)
      likelihood = bmb.Likelihood("Bernoulli", parent="p")
      link = bmb.Link(
          "my_logit",
          link=special.expit,
          linkinv=special.logit,
          linkinv_backend=pm.math.sigmoid,
      )
      family = bmb.Family("bernoulli", likelihood, link)
  
      data = pd.DataFrame(
          {
              "y": [0, 1, 0, 0, 1, 0, 1, 0, 1, 0],
              "x1": rng.uniform(size=10),
              "x2": rng.uniform(size=10),
          }
      )
      model = bmb.Model("y ~ x1 + x2", data, family=family)
      model.build()
  
imports: from os.path import dirname, join
  import pytest
  import numpy
  import pymc
  import pandas
  from scipy import special
  import bambi
label_desc: Use image node_id 12 for calling a global function with example usage: test_custom_link() without return types