<s> """<STR_LIT>""" <EOL> from django import template <EOL> register = template . Library ( ) <EOL> @ register . filter <EOL> def exists_flowspace_for_aggregate ( flowspace , aggregate ) : <EOL> """<STR_LIT>""" <EOL> exists = False <EOL> for rule in flowspace : <EOL> for sliver in rule . slivers . all ( ) : <EOL> if sliver . resource . aggregate . id == aggregate . id : <EOL> exists = True <EOL> break <EOL> return exists <EOL> @ register . filter <EOL> def key ( dictionary , key_name ) : <EOL> try : <EOL> return dictionary [ key_name ] <EOL> except : <EOL> return "<STR_LIT>" </s>
