def get_nodes(category=None):
    if category is None:
        return _all_nodes.values()

    if isinstance(category, basestring):
        category = [category]
    categories = set(category)

    # get all nodes matching categories    
    nodes = []
    for node in _all_nodes.itervalues():
        if categories.intersection(node.categories):
            nodes.append(node)

    return nodes
Test if data provider can correctly handle filters on keys on related models
dataset/ETHPy150Open manahl/mdf/mdf/context.py/get_nodes--crossover with--dataset/ETHPy150Open tnajdek/django-kendoui-backend/kendoui_backend/tests.py/KendoUITest.test_filter_with_related