@register.simple_tag(takes_context=True)
def set_key(context, key):
    if key:
        context['key'] = key
    else:
        context['key'] = ''
    return ''
populates variable into a context
dataset/ETHPy150Open adlibre/Adlibre-DMS/adlibre_dms/apps/mdtui/templatetags/index_keys.py/set_key