@register.assignment_tag(takes_context=True)
def page_is_active(context, page, feincms_page=None, path=None):
    if isinstance(page, PagePretender):
        if path is None:
            path = context['request'].path_info
        return path.startswith(page.get_absolute_url())

    else:
        if feincms_page is None:
            feincms_page = context['feincms_page']
        return page.is_ancestor_of(feincms_page, include_self=True)
Minimize a function over a hyperparameter space.
dataset/ETHPy150Open feincms/feincms/feincms/templatetags/feincms_page_tags.py/page_is_active--crossover with--dataset/ETHPy150Open hyperopt/hyperopt/hyperopt/fmin.py/fmin