code: def make_debug_wrapper(fn):
      def gl_debug_wrapper(*args):
          # Log function call
          argstr = ", ".join(map(_arg_repr, args))
          logger.debug("%s(%s)" % (fn.__name__, argstr))
          # Call function
          ret = fn(*args)
          # Log return value
          if ret is not None:
              if fn.__name__ == "glReadPixels":
                  logger.debug(" <= %s[%s]" % (type(ret), len(ret)))
              else:
                  logger.debug(" <= %s" % repr(ret))
          # Check for errors (raises if an error occured)
          check_error(fn.__name__)
          # Return
          return ret
  
      gl_debug_wrapper.__name__ = fn.__name__ + "_debug_wrapper"
      # Store reference to wrapped function just for introspection
      gl_debug_wrapper._wrapped_function = fn
      return gl_debug_wrapper
  
file_path: vispy/vispy/gloo/gl/__init__.py
imports: from __future__ import division
  import os
  from ...util import config, logger
  from ._constants import *
  from ._proxy import BaseGLProxy
  from .None import gl2
label_desc: Use image node_id 5 for calling a global function with example usage: make_debug_wrapper(fn) and returns: gl_debug_wrapper, ret