code: def test_wrappers_basic_glir():
      """Test that basic gloo wrapper functions emit right GLIR command"""
      glir = install_dummy_glir()
  
      funcs = [
          ("viewport", 0, 0, 10, 10),
          ("depth_range", 0, 1),
          ("front_face", "ccw"),
          ("cull_face", "back"),
          ("line_width", 1),
          ("polygon_offset", 0, 0),
          ("clear_color",),
          ("clear_depth",),
          ("clear_stencil",),
          ("blend_func",),
          ("blend_color", "red"),
          ("blend_equation", "X"),
          ("scissor", 0, 0, 10, 10),
          ("stencil_func",),
          ("stencil_mask",),
          ("stencil_op",),
          ("depth_func",),
          ("depth_mask", "X"),
          ("color_mask", False, False, False, False),
          ("sample_coverage",),
          ("hint", "foo", "bar"),
          # not finish and flush, because that would flush the glir queue
      ]
  
      for func in funcs:
          name, args = func[0], func[1:]
          f = getattr(gloo, "set_" + name)
          f(*args)
  
      cmds = glir.clear()
      assert len(cmds) == len(funcs)
      for i, func in enumerate(funcs):
          cmd = cmds[i]
          nameparts = [a.capitalize() for a in func[0].split("_")]
          name = "gl" + "".join(nameparts)
          assert cmd[0] == "FUNC"
          if cmd[1].endswith("Separate"):
              assert cmd[1][:-8] == name
          else:
              assert cmd[1] == name
  
      reset_glir()
  
file_path: vispy/vispy/gloo/tests/test_wrappers.py
imports: import numpy
  from numpy.testing import assert_array_equal, assert_allclose
  from vispy import gloo
  from vispy.gloo import gl
  from vispy.app import Canvas
  from vispy.testing import requires_application, run_tests_if_main, assert_true, assert_equal, assert_raises
  from vispy.gloo import read_pixels
  from vispy.gloo.glir import GlirQueue
  from vispy.gloo import wrappers
label_desc: Use image node_id 4 for calling a global function with example usage: test_wrappers_basic_glir() without return types