def METHOD_NAME(self):
    glcontext = Context.getCurrent()
    if glcontext not in self._programs:
        raise RuntimeError(
            "Program was not compiled for current OpenGL context.")
    return self._programs[glcontext]