code: def test_lambdify():
      # Test lambdify with implemented functions
      # first test basic (sympy) lambdify
      f = sympy.cos
      assert lambdify(x, f(x))(0) == 1
      assert lambdify(x, 1 + f(x))(0) == 2
      assert lambdify((x, y), y + f(x))(0, 1) == 2
      # make an implemented function and test
      f = implemented_function("f", lambda x: x + 100)
      assert lambdify(x, f(x))(0) == 100
      assert lambdify(x, 1 + f(x))(0) == 101
      assert lambdify((x, y), y + f(x))(0, 1) == 101
      # Error for functions with same name and different implementation
      f2 = implemented_function("f", lambda x: x + 101)
      pytest.raises(ValueError, lambdify, x, f(f2(x)))
      # our lambdify, like sympy's lambdify, can also handle tuples,
      # lists, dicts as expressions
      lam = lambdify(x, (f(x), x))
      assert lam(3) == (103, 3)
      lam = lambdify(x, [f(x), x])
      assert lam(3) == [103, 3]
      lam = lambdify(x, [f(x), (f(x), x)])
      assert lam(3) == [103, (103, 3)]
      lam = lambdify(x, {f(x): x})
      assert lam(3) == {103: 3}
      lam = lambdify(x, {f(x): x})
      assert lam(3) == {103: 3}
      lam = lambdify(x, {x: f(x)})
      assert lam(3) == {3: 103}
  
file_path: nipy/nipy/modalities/fmri/tests/test_aliases.py
imports: import numpy
  import pytest
  import scipy.interpolate
  import sympy
  from numpy.testing import assert_almost_equal
  from sympy.utilities.lambdify import implemented_function, lambdify
label_desc: Use image node_id 2 for calling a global function with example usage: test_lambdify() without return types