code: def display():
      global cuda_pbo_resource, pbo_buffer, texid, imWidth, imHeight, timer
  
      timer = time.time()  # Starting timer
      mapping_obj = cuda_pbo_resource.map()  # Map the GlBuffer
      if ver2011:
          (
              data,
              sz,
          ) = (
              mapping_obj.device_ptr_and_size()
          )  # Got the CUDA pointer to GlBuffer
      else:
          data = mapping_obj.device_ptr()
      sobelFilter(data, imWidth, imHeight)  # Writing to "data"
      mapping_obj.unmap()  # Unmap the GlBuffer
  
      glClear(GL_COLOR_BUFFER_BIT)  # Clear
      glBindTexture(GL_TEXTURE_2D, texid)
      glBindBuffer(GL_PIXEL_UNPACK_BUFFER, pbo_buffer)
      # Copyng from buffer to texture
      glTexSubImage2D(
          GL_TEXTURE_2D,
          0,
          0,
          0,
          imWidth,
          imHeight,
          GL_LUMINANCE,
          GL_UNSIGNED_BYTE,
          None,
      )
      # glTexImage2D(GL_TEXTURE_2D, 0, GL_LUMINANCE, imWidth, imHeight,  0, GL_LUMINANCE, GL_UNSIGNED_BYTE, None);
      glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0)  # Unbind
  
      glDisable(GL_DEPTH_TEST)
      glEnable(GL_TEXTURE_2D)
      glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR)
      glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR)
      glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT)
      glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT)
  
      glBegin(GL_QUADS)
      glVertex2f(0, 0)
      glTexCoord2f(0, 0)
      glVertex2f(0, 1)
      glTexCoord2f(1, 0)
      glVertex2f(1, 1)
      glTexCoord2f(1, 1)
      glVertex2f(1, 0)
      glTexCoord2f(0, 1)
      glEnd()
      glBindTexture(GL_TEXTURE_2D, 0)
      glutSwapBuffers()
      timer = time.time() - timer
      computeFPS()
      glutPostRedisplay()
  
imports: from OpenGL.GL import *
  from OpenGL.GLUT import *
  from OpenGL.GLU import *
  from OpenGL.GL.ARB.vertex_buffer_object import *
  import numpy, Image
  import sys, time, os
  import pycuda.driver
  import pycuda.gl
  import pycuda
  from pycuda.compiler import SourceModule
label_desc: Use image node_id 7 for calling a global function with example usage: display() without return types