'Try to use a already created context for the given gpu.  If none
existed, create a new context.
Returns the context'

def _get_or_create_context(self, gpu):

    with self._lock:
        ctx = gpu.get_primary_context()
        ctx.push()
        return ctx
