#NEWLINE# def __init__( self , data_stream , names , **kwargs ) : #NEWLINE# #INDENT# sources = list ( data_stream . sources ) #NEWLINE# for ( old , new ) in iteritems ( names ) : #NEWLINE# #INDENT# if ( old not in sources ) : #NEWLINE# #INDENT# raise KeyError ( ( '%s not in the sources of the stream' % old ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# sources [ sources . index ( old ) ] = new #NEWLINE# #UNINDENT# #UNINDENT# self . sources = tuple ( sources ) #NEWLINE# if data_stream . axis_labels : #NEWLINE# #INDENT# kwargs . setdefault ( 'axis_labels' , dict ( ( ( ( names [ source ] if ( source in names ) else source ) , labels ) for ( source , labels ) in iteritems ( data_stream . axis_labels ) ) ) ) #NEWLINE# #UNINDENT# super ( Rename , self ) . __init__ ( data_stream , data_stream . produces_examples , ** kwargs )