def METHOD_NAME(root_item: QTreeWidgetItem) -> Dict[str, bool]:
    for i in range(root_item.childCount()):
        item = root_item.child(i)
        checked_state = Qt.Checked if checked else Qt.Unchecked
        print(i, checked_state)
        item.setCheckState(i, checked_state)
        if item.childCount() > 0:
            METHOD_NAME(item)