code: def treeItemChanged(self, item, col):
      try:
          citem = item.canvasItem()
      except AttributeError:
          return
      if item.checkState(0) == QtCore.Qt.CheckState.Checked:
          for i in range(item.childCount()):
              item.child(i).setCheckState(
                  0, QtCore.Qt.CheckState.Checked
              )
          citem.show()
      else:
          for i in range(item.childCount()):
              item.child(i).setCheckState(
                  0, QtCore.Qt.CheckState.Unchecked
              )
          citem.hide()
  
imports: import gc
  import importlib
  import weakref
  import warnings
  from ..graphicsItems.GridItem import GridItem
  from ..graphicsItems.ROI import ROI
  from ..graphicsItems.ViewBox import ViewBox
  from ..Qt import QT_LIB, QtCore, QtGui, QtWidgets
  from .None import CanvasTemplate_generic
  from .CanvasItem import CanvasItem, GroupCanvasItem
  from .CanvasManager import CanvasManager
label_desc: Use image node_id 9 for calling the Canvas obj's underlying member method code with example usage: obj.treeItemChanged(item, col) without return types