parameters: (self, methodname, args=(), kwds={})
docstring: Try to call a method of the referent and return a copy of the result
docstring_summary: Try to call a method of the referent and return a copy of the result
docstring_tokens: Try to call a method of the referent and return a copy of the result
function: def _callmethod(self, methodname, args=(), kwds={}):
          '''
          Try to call a method of the referent and return a copy of the result
          '''
          try:
              conn = self._tls.connection
          except AttributeError:
              util.debug('thread %r does not own a connection',
                         threading.current_thread().name)
              self._connect()
              conn = self._tls.connection
  
          conn.send((self._id, methodname, args, kwds))
          kind, result = conn.recv()
  
          if kind == '#RETURN':
              return result
          elif kind == '#PROXY':
              exposed, token = result
              proxytype = self._manager._registry[token.typeid][-1]
              token.address = self._token.address
              proxy = proxytype(
                  token, self._serializer, manager=self._manager,
                  authkey=self._authkey, exposed=exposed
                  )
              conn = self._Client(token.address, authkey=self._authkey)
              dispatch(conn, None, 'decref', (token.id,))
              return proxy
          raise convert_to_error(kind, result)
function_tokens: def _callmethod ( self , methodname , args = ( ) , kwds = { } ) : try : conn = self . _tls . connection except AttributeError : util . debug ( 'thread %r does not own a connection' , threading . current_thread ( ) . name ) self . _connect ( ) conn = self . _tls . connection conn . send ( ( self . _id , methodname , args , kwds ) ) kind , result = conn . recv ( ) if kind == '#RETURN' : return result elif kind == '#PROXY' : exposed , token = result proxytype = self . _manager . _registry [ token . typeid ] [ - 1 ] token . address = self . _token . address proxy = proxytype ( token , self . _serializer , manager = self . _manager , authkey = self . _authkey , exposed = exposed ) conn = self . _Client ( token . address , authkey = self . _authkey ) dispatch ( conn , None , 'decref' , ( token . id , ) ) return proxy raise convert_to_error ( kind , result )