def populate_filter_tree(self):
        self.filterTreeWidget.clear()

        for name, manager in sorted(self.filter_managers.items()):
            top = QTreeWidgetItem(self.filterTreeWidget)
            top.setText(0, name)
            top.setFlags(Qt.ItemIsEnabled | Qt.ItemIsDropEnabled)
            top.setData(1, Qt.UserRole, self.FilterTreeRoleTop)
            top.setTextColor(0, Qt.gray)
            top.setChildIndicatorPolicy(QTreeWidgetItem.ShowIndicator)
            self.filterTreeWidget.addTopLevelItem(top)
            if manager.list_items():
                top.setExpanded(True)

            for i in manager.list_items():
                if isinstance(i[1], manager.FilterGroup):
                    group = QTreeWidgetItem(top)
                    group.setText(0, i[0])
                    group.setData(1, Qt.UserRole,
                                  self.FilterTreeRoleGroup)
                    group.setFlags(Qt.ItemIsEnabled | Qt.ItemIsSelectable |
                                   Qt.ItemIsDropEnabled |
                                   Qt.ItemIsDragEnabled)
                    group.setChildIndicatorPolicy(
                        QTreeWidgetItem.ShowIndicator)
                    if i[1].list_items():
                        group.setExpanded(True)
                    top.addChild(group)

                    for f in i[1].list_items():
                        item = QTreeWidgetItem(group)
                        item.setText(0, f[0])
                        if f[1].active:
                            item.setData(0, CheckableItemDelegate.CheckedRole,
                                         True)
                        else:
                            item.setData(0, CheckableItemDelegate.CheckedRole,
                                         False)
                        if i[1].exclusive:
                            item.setData(0,
                                         CheckableItemDelegate.CheckTypeRole,
                                         CheckableItemDelegate.RadioCheckType)
                        else:
                            item.setData(0,
                                         CheckableItemDelegate.CheckTypeRole,
                                         CheckableItemDelegate.CheckBoxCheckType)
                        item.setData(1, Qt.UserRole,
                                     self.FilterTreeRoleFilter)
                        item.setFlags(Qt.ItemIsEnabled |
                                      Qt.ItemIsSelectable |
                                      Qt.ItemIsDragEnabled)
                        group.addChild(item)
                else:
                    item = QTreeWidgetItem(top)
                    item.setText(0, i[0])
                    if i[1].active:
                        item.setData(0, CheckableItemDelegate.CheckedRole,
                                     True)
                    else:
                        item.setData(0, CheckableItemDelegate.CheckedRole,
                                     False)
                    item.setData(0, CheckableItemDelegate.CheckTypeRole,
                                 CheckableItemDelegate.CheckBoxCheckType)
                    item.setData(1, Qt.UserRole,
                                 self.FilterTreeRoleFilter)
                    item.setFlags(Qt.ItemIsEnabled |
                                  Qt.ItemIsSelectable |
                                  Qt.ItemIsDragEnabled)
                    top.addChild(item)
Returns a list of lists or strings, representing the code body.
dataset/ETHPy150Open rproepp/spykeviewer/spykeviewer/ui/filter_dock.py/FilterDock.populate_filter_tree--crossover with--dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/django-extensions-1.5.0/django_extensions/management/commands/dumpscript.py/InstanceCode.get_lines