code: def initialize():
      platform = cl.get_platforms()[0]
  
      from pyopencl.tools import get_gl_sharing_context_properties
      import sys
  
      if sys.platform == "darwin":
          ctx = cl.Context(
              properties=get_gl_sharing_context_properties(), devices=[]
          )
      else:
          # Some OSs prefer clCreateContextFromType, some prefer
          # clCreateContext. Try both.
          try:
              ctx = cl.Context(
                  properties=[
                      (cl.context_properties.PLATFORM, platform)
                  ]
                  + get_gl_sharing_context_properties()
              )
          except:
              ctx = cl.Context(
                  properties=[
                      (cl.context_properties.PLATFORM, platform)
                  ]
                  + get_gl_sharing_context_properties(),
                  devices=[platform.get_devices()[0]],
              )
  
      glClearColor(1, 1, 1, 1)
      glColor(0, 0, 1)
      vbo = glGenBuffers(1)
      glBindBuffer(GL_ARRAY_BUFFER, vbo)
      rawGlBufferData(
          GL_ARRAY_BUFFER, n_vertices * 2 * 4, None, GL_STATIC_DRAW
      )
      glEnableClientState(GL_VERTEX_ARRAY)
      glVertexPointer(2, GL_FLOAT, 0, None)
      coords_dev = cl.GLBuffer(ctx, cl.mem_flags.READ_WRITE, int(vbo))
      prog = cl.Program(ctx, src).build()
      queue = cl.CommandQueue(ctx)
      cl.enqueue_acquire_gl_objects(queue, [coords_dev])
      prog.generate_sin(queue, (n_vertices,), None, coords_dev)
      cl.enqueue_release_gl_objects(queue, [coords_dev])
      queue.finish()
      glFlush()
  
imports: from OpenGL.GL import *
  from OpenGL.GLUT import *
  from OpenGL.raw.GL.VERSION.GL_1_5 import glBufferData
  import pyopencl
label_desc: Use image node_id 1 for calling a global function with example usage: initialize() without return types