#NEWLINE# def set_style( self , name ) : #NEWLINE# #INDENT# '\n        Sets table style.\n\n        :param name: The name of the style\n        :type name: str\n        ' #NEWLINE# if isinstance ( name , TableStyle ) : #NEWLINE# #INDENT# self . _style = name #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( name in self . styles ) : #NEWLINE# #INDENT# self . _style = self . styles [ name ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise CleoException ( ( 'Style "%s" is not defined.' % name ) ) #NEWLINE# #UNINDENT# #UNINDENT# return self