#NEWLINE# def get_tx_composer( self , op_tx_spec ) : #NEWLINE# #INDENT# 'Returns a function which is able to convert a given operational\n        tx spec <op_tx_spec> into a composed tx spec\n        ' #NEWLINE# if op_tx_spec . is_monocolor ( ) : #NEWLINE# #INDENT# color_def = op_tx_spec . get_targets ( ) [ 0 ] . get_colordef ( ) #NEWLINE# if ( color_def == UNCOLORED_MARKER ) : #NEWLINE# #INDENT# return compose_uncolored_tx #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return color_def . compose_tx_spec #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# for target in op_tx_spec . get_targets ( ) : #NEWLINE# #INDENT# tgt_color_def = target . get_colordef ( ) #NEWLINE# if ( tgt_color_def is UNCOLORED_MARKER ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return tgt_color_def . compose_tx_spec #NEWLINE# #UNINDENT# #UNINDENT# return None