code: def test_varyings(self):
      # Varyings and constants are detected
      program = Program("varying float A; const vec4 B;", "foo")
      assert ("varying", "float", "A") in program.variables
      assert ("const", "vec4", "B") in program.variables
  
      # But cannot be set
      self.assertRaises(KeyError, program.__setitem__, "A", 3.0)
      self.assertRaises(
          KeyError, program.__setitem__, "B", (1.0, 2.0, 3.0)
      )
      # And anything else also fails
      self.assertRaises(KeyError, program.__getitem__, "fooo")
  
imports: import unittest
  import numpy
  from vispy import gloo, app
  from vispy.gloo.program import Program
  from vispy.testing import run_tests_if_main, requires_application
  from vispy.gloo.context import set_current_canvas, forget_canvas
label_desc: Use image node_id 7 for calling the ProgramTest obj's underlying member method code with example usage: obj.test_varyings() without return types