#NEWLINE# def add_card( self , card_type , title , content ) : #NEWLINE# #INDENT# 'Add a card to the response.' #NEWLINE# assert ( self . card is None ) #NEWLINE# card = { #NEWLINE# #INDENT# 'type' : card_type . value , #NEWLINE# #UNINDENT# } #NEWLINE# if ( card_type == CardType . link_account ) : #NEWLINE# #INDENT# self . card = card #NEWLINE# return #NEWLINE# #UNINDENT# card [ 'title' ] = ( self . _render ( title ) , ) #NEWLINE# card [ 'content' ] = self . _render ( content ) #NEWLINE# self . card = card