def __request(self, methodname, params):
        """call a method on the remote server
        """

        request = dumps(params, methodname, encoding=self.__encoding,
                        allow_none=self.__allow_none)

        response = self.__transport.request(
            self.__host,
            self.__handler,
            request.encode(self.__encoding),
            self.__encoding,
            verbose=self.__verbose
        )

        if len(response) == 1:
            response = response[0]

        return response
dataset/ETHPy150Open circuits/circuits/tests/web/jsonrpclib.py/ServerProxy.__request/original