#NEWLINE# def get_tag( value ) : #NEWLINE# #INDENT# 'Retrieve Tag object based on given String\n\n    If no such Tag object exists, return a new Tag object.\n    ' #NEWLINE# tag = Tag . query . filter ( ( Tag . value == value ) ) . first ( ) #NEWLINE# if ( tag is None ) : #NEWLINE# #INDENT# return Tag ( value ) #NEWLINE# #UNINDENT# return tag