code: def __init__(self, vispy_canvas, **kwargs):
      BaseCanvasBackend.__init__(self, vispy_canvas)
      RemoteFrameBuffer.__init__(self)
      # Use a context per canvas, because we seem to make assumptions
      # about OpenGL state being local to the canvas.
      self._context = (
          OffscreenContext()
      )  # OffscreenContext.get_global_instance()
      self._helper = FrameBufferHelper()
      self._loop = asyncio.get_event_loop()
      self._logical_size = 1, 1
      self._physical_size = 1, 1
      self._lifecycle = (
          0  # 0: not initialized, 1: initialized, 2: closed
      )
      # Init more based on kwargs (could maybe handle, title, show, context)
      self._vispy_set_size(*kwargs["size"])
      self.resizable = kwargs["resizable"]
      # Need a first update
      self._vispy_update()
  
imports: import asyncio
  from ..base import BaseApplicationBackend, BaseCanvasBackend, BaseTimerBackend
  from ...app import Timer
  from ...util import keys
  from ._offscreen_util import OffscreenContext, FrameBufferHelper
label_desc: Use image node_id 1 to create a new CanvasBackend object from inherited base classes: BaseCanvasBackend, RemoteFrameBuffer with example: obj = CanvasBackend(vispy_canvas)