code: def test_FunctionChain():
      f1 = Function("void f1(){}")
      f2 = Function("void f2(){}")
      f3 = Function("float f3(vec3 x){}")
      f4 = Function("vec3 f4(vec3 y){}")
      f5 = Function("vec3 f5(vec4 z){}")
  
      ch = FunctionChain("chain", [f1, f2])
      assert ch.name == "chain"
      assert ch.args == []
      assert ch.rtype == "void"
  
      assert_in("f1", ch.compile())
      assert_in("f2", ch.compile())
  
      ch.remove(f2)
      assert_not_in("f2", ch.compile())
  
      ch.append(f2)
      assert_in("f2", ch.compile())
  
      ch = FunctionChain(funcs=[f5, f4, f3])
      assert_equal("float", ch.rtype)
      assert_equal([("vec4", "z")], ch.args)
      assert_in("f3", ch.compile())
      assert_in("f4", ch.compile())
      assert_in("f5", ch.compile())
      assert_in(f3, ch.dependencies())
      assert_in(f4, ch.dependencies())
      assert_in(f5, ch.dependencies())
  
file_path: vispy/vispy/visuals/shaders/tests/test_function.py
imports: from vispy.visuals.shaders import Function, MainFunction, Variable, Varying, FunctionChain, StatementList
  from vispy.visuals.shaders.expression import FunctionCall, TextExpression
  from vispy.testing import assert_in, assert_not_in, assert_is, run_tests_if_main, assert_raises, assert_equal
label_desc: Use image node_id 8 for calling a global function with example usage: test_FunctionChain() without return types