@library.global_function
def is_contributor(user):
 return (user.is_authenticated() and (user.groups.filter(name='Registered as contributor').count() > 0))

@ library . global_function def is_contributor ( user ) : return ( user . is_authenticated ( ) and ( user . groups . filter ( name = 'Registered as contributor' ) . count ( ) > 0 ) )
return whether the user is in the registered as contributor group .