def get_categories(self, tracker=None, noid=False, noowner=False):
        trs = [tracker] if tracker is not None else self.trackers
        categories = []
        for tr in trs:
            for cat in tr.categories:
                c = (cat.id, cat.category_name, cat.auto_assignee)
                if c not in categories:
                    categories.append(c)
        #: sort by name
        if noid:
            categories.sort()
        else:
            categories.sort(key=lambda x:x[1])
        if noowner:
            categories = [x[:2] for x in categories]
        if noid:
            categories = [x[1:] for x in categories]
        return categories
SF categories : Trac components
dataset/ETHPy150Open edgewall/trac/contrib/sourceforge2trac.py/ExportedProjectData.get_categories