code: def selected_mapping(self):
          
          value_map = {}
          tree_clone = self.treeClasses.invisibleRootItem().clone()
          for tree_branch in tree_clone.takeChildren():
              value_list = []
              for tree_leaf in tree_branch.takeChildren():
                  value_list += [tree_leaf.data(0, Qt.UserRole)]
              if value_list:
                  value_map[tree_branch.data(0, Qt.UserRole)] = value_list
          return value_map
docs: Obtain the value-to-class mapping set by user.
  
          :returns: The complete mapping as a dict of lists.
          :rtype: dict