def callRemote(self, method, *args, **kwargs):

        if kwargs:
            json_request = jsonrpc.encodeRequest(method, kwargs,
                                                 version=self.version)
        else:
            json_request = jsonrpc.encodeRequest(method, args,
                                                 version=self.version)

        body = StringProducer(json_request)

        headers_dict = {'Content-Type': ['application/json']}
        if not isinstance(self.credentials, Anonymous):
            headers_dict.update(self._getBasicHTTPAuthHeaders())
        headers = Headers(headers_dict)

        d = self.agent.request('POST', self.url, headers, body)
        d.addCallback(self.checkAuthError)
        d.addCallback(self.bodyFromResponse)
        d.addCallback(jsonrpc.decodeResponse)
        return d
Test to return an int representing the amount of memory
dataset/ETHPy150Open tadeas/fastjsonrpc/fastjsonrpc/client.py/Proxy.callRemote--crossover with--dataset/ETHPy150Open saltstack/salt/tests/unit/modules/xapi_test.py/XapiTestCase.test_freemem