<s> """<STR_LIT>""" <EOL> from docutils import nodes <EOL> from docutils . parsers . rst import directives <EOL> from docutils . parsers . rst . directives import images <EOL> class Figure ( images . Figure ) : <EOL> """<STR_LIT>""" <EOL> def run ( self ) : <EOL> name = self . options . pop ( '<STR_LIT:name>' , None ) <EOL> result = images . Figure . run ( self ) <EOL> if len ( result ) == <NUM_LIT:2> or isinstance ( result [ <NUM_LIT:0> ] , nodes . system_message ) : <EOL> return result <EOL> ( figure_node , ) = result <EOL> if name : <EOL> self . options [ '<STR_LIT:name>' ] = name <EOL> self . add_name ( figure_node ) <EOL> return [ figure_node ] <EOL> directives . register_directive ( '<STR_LIT>' , Figure ) </s>
