def get_category_lists(init_kwargs=None, additional_parents_aliases=None, obj=None):
    init_kwargs = init_kwargs or {}
    additional_parents_aliases = additional_parents_aliases or []

    parent_aliases = additional_parents_aliases
    if obj is not None:
        ctype = ContentType.objects.get_for_model(obj)
        cat_ids = [
            item[0] for item in
            get_tie_model().objects.filter(content_type=ctype, object_id=obj.id).values_list('category_id').all()
        ]
        parent_aliases = list(get_cache().get_parents_for(cat_ids).union(additional_parents_aliases))
    lists = []

    aliases = get_cache().sort_aliases(parent_aliases)
    categories_cache = get_cache().get_categories(aliases, obj)

    for parent_alias in aliases:
        catlist = CategoryList(parent_alias, **init_kwargs)  # TODO Burned in class name. Make more customizable.
        if obj is not None:
            catlist.set_obj(obj)
        # Optimization. To get DB hits down.
        cache = []
        try:
            cache = categories_cache[parent_alias]
        except KeyError:
            pass
        catlist.set_get_categories_cache(cache)
        lists.append(catlist)

    return lists
Returns a list of CategoryList objects, optionally associated with
dataset/ETHPy150Open idlesign/django-sitecats/sitecats/toolbox.py/get_category_lists