def classes(*args, **kwargs):
    classes = list(filter(None, args)) + [k for k, v in kwargs.items() if v]
    if not classes:
        return None
    return u' '.join(classes)
Add session-related entries to the template namespace. This is
dataset/ETHPy150Open edgewall/trac/trac/util/presentation.py/classes--crossover with--dataset/ETHPy150Open erkyrath/tworld/lib/tweblib/handlers.py/MyHandlerMixin.extend_template_namespace