code: def test_update_gl_state_context_manager():
      node = vispy.visuals.MeshVisual()
  
      node.set_gl_state(blend=False)
      og_gl_state = node._vshare.gl_state.copy()
  
      with node.update_gl_state(blend=True):
          # check that the state was updated
          assert node._vshare.gl_state == {**og_gl_state, "blend": True}
  
      # the update should be reverted once out of the context
      assert node._vshare.gl_state == og_gl_state
  
file_path: vispy/vispy/scene/tests/test_visuals.py
imports: import pytest
  from vispy.scene import visuals, Node
  from vispy.scene.visuals import VisualNode
  import vispy.visuals
label_desc: Use image node_id 7 for calling a global function with example usage: test_update_gl_state_context_manager() without return types