code: def setCanvas(self, canvas):
      ## Called by canvas whenever the item is added.
      ## It is our responsibility to add all graphicsItems to the canvas's scene
      ## The canvas will automatically add our graphicsitem,
      ## so we just need to take care of the selectbox.
      if canvas is self.canvas:
          return
  
      if canvas is None:
          self.canvas.removeFromScene(self._graphicsItem)
          self.canvas.removeFromScene(self.selectBox)
      else:
          canvas.addToScene(self._graphicsItem)
          canvas.addToScene(self.selectBox)
      self.canvas = canvas
  
imports: import importlib
  from ..None import ItemGroup, SRTTransform, debug
  from ..None import functions
  from ..graphicsItems.ROI import ROI
  from ..Qt import QT_LIB, QtCore, QtWidgets
  from .None import TransformGuiTemplate_generic
label_desc: Use image node_id 3 for calling the CanvasItem obj's underlying member method code with example usage: obj.setCanvas(canvas) without return types