#NEWLINE# def get_actor_name_map( self , ns ) : #NEWLINE# #INDENT# actors = { v : [ component ] for ( k , v ) in self . actors . items ( ) if ( v is not None ) } #NEWLINE# components = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# l = ( ( len ( ns ) + 1 ) if ns else 0 ) #NEWLINE# for ( name , _id ) in actors . iteritems ( ) : #NEWLINE# #INDENT# if ( name . find ( ':' , l ) > ( - 1 ) ) : #NEWLINE# #INDENT# component = ':' . join ( name . split ( ':' ) [ 0 : ( 2 if ns else 1 ) ] ) #NEWLINE# if ( component in components . keys ( ) ) : #NEWLINE# #INDENT# components [ component ] += _id #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# components [ component ] = _id #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# actors . update ( components ) #NEWLINE# return actors