#NEWLINE# def send( self , target , action , * args , **kwargs ) : #NEWLINE# #INDENT# 'Send a message to ``target`` to perform ``action`` with given\n        positional ``args`` and key-valued ``kwargs``.\n        Returns a coroutine or a Future.\n        ' #NEWLINE# target = ( self . monitor if ( target == 'monitor' ) else target ) #NEWLINE# mailbox = self . mailbox #NEWLINE# if isinstance ( target , ActorProxyMonitor ) : #NEWLINE# #INDENT# mailbox = target . mailbox #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# actor = self . get_actor ( target ) #NEWLINE# if isinstance ( actor , Actor ) : #NEWLINE# #INDENT# return command_in_context ( action , self , actor , args , kwargs ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if isinstance ( actor , ActorProxyMonitor ) : #NEWLINE# #INDENT# mailbox = actor . mailbox #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# if hasattr ( mailbox , 'request' ) : #NEWLINE# #INDENT# return mailbox . request ( action , actor , target , args , kwargs ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise CommandError ( ( 'Cannot execute "%s" in %s. Unknown actor %s.' % ( action , self , target ) ) )