code: def test_inverse():
      # Logic check that link.inverse(link) and link(link.inverse)
      # are the identity.
      np.random.seed(3285)
  
      for link in Links:
          for k in range(10):
              p = np.random.uniform(0, 1)  # In domain for all families
              d = link.inverse(link(p))
              assert_allclose(d, p, atol=1e-8, err_msg=str(link))
  
              z = get_domainvalue(link)
              d = link(link.inverse(z))
              assert_allclose(d, z, atol=1e-8, err_msg=str(link))
  
file_path: statsmodels/statsmodels/genmod/families/tests/test_link.py
imports: import numpy
  from numpy.testing import assert_allclose, assert_equal, assert_array_less
  from scipy import stats
  import pytest
  import statsmodels.genmod.families
  from statsmodels.tools import numdiff
label_desc: Use image node_id 2 for calling a global function with example usage: test_inverse() without return types