code: def get_current_canvas():
      """Get the currently active canvas
  
      Returns None if there is no canvas available. A canvas is made
      active on initialization and before the draw event is emitted.
  
      When a gloo object is created, it is associated with the currently
      active Canvas, or with the next Canvas to be created if there is
      no current Canvas. Use Canvas.set_current() to manually activate a
      canvas.
      """
      cc = [c() for c in canvasses if c() is not None]
      if cc:
          return cc[-1]
      else:
          return None
  
imports: from copy import deepcopy
  import weakref
  from .glir import GlirQueue, BaseGlirParser, GlirParser, glir_logger
  from .wrappers import BaseGlooFunctions
  from ..None import config
label_desc: Use image node_id 2 for calling a global function with example usage: get_current_canvas() and returns: cc, None