code: def eglCreateContext(
      display, config, shareContext=EGL_NO_CONTEXT, attribList=None
  ):
      # Deal with attrib list
      attribList = attribList or [EGL_CONTEXT_CLIENT_VERSION, 2]
      attribList = [a for a in attribList] + [EGL_NONE]
      attribList = (_c_int * len(attribList))(*attribList)
      #
      res = c_void_p(
          _lib.eglCreateContext(
              display, config, shareContext, attribList
          )
      )
      if res == EGL_NO_CONTEXT:
          e = eglGetError()
          if e == EGL_BAD_CONFIG:
              raise ValueError(
                  "Could not create context: given config is "
                  + "not supported by this system."
              )
          else:
              raise RuntimeError(
                  "Could not create context due to "
                  + "unknown error: %i" % e
              )
      return res
  
file_path: vispy/vispy/ext/egl.py
imports: import os
  import ctypes
  from ctypes import c_int, POINTER, c_void_p, c_char_p
label_desc: Use image node_id 11 for calling a global function with example usage: eglCreateContext(display, config, shareContext, attribList) and returns: res