code: def test_link_func_log():
      predictions = np.array(
          [
              np.inf,
              1 / np.exp(1),
              1.0,
              np.exp(1),
              np.exp(2),
              0.0,
              np.nan,
          ]
      )
      expected = np.array(
          [np.inf, -1.0, 0.0, 1.0, 2.0, -np.inf, np.nan]
      )
      result = link_func(predictions, "log")
      np.testing.assert_almost_equal(result, expected)
  
imports: import numpy
  import pytest
  from interpret.utils import link_func, inv_link
label_desc: Use image node_id 25 for calling a global function with example usage: test_link_func_log() without return types