@contextfunction
def user_block(context):
    """User block
    :param Context context:
    """
    request = context['request']

    user = request.user.profile
    modules = user.get_perspective().get_modules()
    account = modules.filter(name='treeio.account')
    admin = modules.filter(name='treeio.core')
    if admin:
        admin = admin[0]

    response_format = 'html'
    if context in 'response_format':
        response_format = context['response_format']

    trial = False
    if getattr(settings, 'HARDTREE_SUBSCRIPTION_USER_LIMIT') == 3:
        trial = True

    active = context.get('active', None)

    return Markup(render_to_string('core/tags/user_block',
                  {'user': user,
                   'account': account,
                   'admin': admin,
                   'active': active,
                   'trial': trial},
                  response_format=response_format))
dataset/ETHPy150Open treeio/treeio/treeio/core/templatetags/user.py/user_block/swapped operands of `in`