code: def test_Variable():
      # Test init fail
      assert_raises(TypeError, Variable)  # no args
      assert_raises(TypeError, Variable, 3)  # wrong type
      assert_raises(TypeError, Variable, "name", "str")  # wrong type
      assert_raises(
          ValueError, Variable, "bla bla"
      )  # need correct vtype
      assert_raises(ValueError, Variable, "uniform b l a")  # too many
  
      # Test init success
      var = Variable("uniform float bla")  # Finally
      assert_equal(var.name, "bla")
      assert_equal(var.dtype, "float")
      assert_equal(var.vtype, "uniform")
      assert var.value is None
  
      # test assign new value
      var.value = 10.0
      assert_equal(var.dtype, "float")  # type is locked; won't change
  
      # test name-only init
      var = Variable("bla")  # Finally
      assert_equal(var.name, "bla")
      assert_equal(var.dtype, None)
      assert_equal(var.vtype, None)
      assert var.value is None
  
      # test assign new value
      var.value = 10
      assert_equal(var.dtype, "int")
      assert_equal(var.vtype, "uniform")
      assert_equal(var.value, 10)
  
      # test init with value
      var = Variable("bla", (1, 2, 3))  # Also valid
      assert_equal(var.name, "bla")
      assert_equal(var.dtype, "vec3")
      assert_equal(var.vtype, "uniform")
      assert_equal(var.value, (1, 2, 3))
  
      # Test value
      # var = Variable('uniform float bla', data)  # Also valid
      # assert_equal(var.value, data)
      # var.value = 3
      # assert_equal(var.value, 3)
  
      # Test repr
      var = Variable("uniform float bla")
      assert_in("uniform float bla", var.compile())
  
      # Test injection, definition, dependencies
      assert_equal(var.expression({var: "xxx"}), "xxx")
      assert_equal(
          var.definition({var: "xxx"}, ("120", ""), None),
          "uniform float xxx;",
      )
      assert_in(var, var.dependencies())
  
      # Renaming
      var = Variable("uniform float bla")
      assert_equal(var.name, "bla")
      var.name = "foo"
      assert_equal(var.name, "foo")
  
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 5 for calling a global function with example usage: test_Variable() without return types