<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def call(self, action, params=None):
 """ Makes an RPC call to the server and returns the json response :param action: RPC method to call :type action: str :param params: Dict of arguments to send with RPC call :type params: dict :raises: :py:exc:`nano.rpc.RPCException` :raises: :py:exc:`requests.exceptions.RequestException` {'balance': '325586539664609129644855132177', 'pending': '2309370940000000000000000000000000'} """

        params = params or {}
        params['action'] = action

        resp = self.session.post(self.host, json=params, timeout=self.timeout)

        result = resp.json()

        if 'error' in result:
            raise RPCException(result['error'])

        return result