#NEWLINE# @ classmethod #NEWLINE# def coerce( self , expr ) : #NEWLINE# #INDENT# 'Returns the ``Query`` representation of the expression.' #NEWLINE# if isinstance ( expr , Query ) : #NEWLINE# #INDENT# return expr #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if isinstance ( expr , basestring ) : #NEWLINE# #INDENT# return Tag ( expr ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise TypeError ( ( 'Expected %s or string, got %s' % ( Query . __name__ , expr ) ) )