Mako filter: used to extract scope from attribute
    :param s: string to extract scope from (filtered string in mako template)
    :return: the scope

def scope(s):
    """
    Mako filter: used to extract scope from attribute
    :param s: string to extract scope from (filtered string in mako template)
    :return: the scope
    """
    if '@' not in s:
        raise ValueError("Unscoped string")
    (local_part, _, domain_part) = s.partition('@')
    return domain_part