code: def forget_canvas(canvas):
      """Forget about the given canvas. Used by the canvas when closed."""
      cc = [c() for c in canvasses if c() is not None]
      while canvas in cc:
          cc.remove(canvas)
      canvasses[:] = [weakref.ref(c) for c in cc]
  
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 4 for calling a global function with example usage: forget_canvas(canvas) without return types