JSONRPC allows for **batch** responses to be communicated
        as arrays of dicts. This method parses out each individual
        element in the batch and returns a list of tuples, each
        tuple a result of parsing of each item in the batch.

        :Returns:   | tuple of (results, is_batch_mode_flag)
                    | where:
                    | - results is a tuple describing the request
                    | - Is_batch_mode_flag is a Bool indicating if the
                    |   request came in in batch mode (as array of requests) or not.

        :Raises:    RPCParseError, RPCInvalidRequest

def parse_response(cls, response_string):
        """JSONRPC allows for **batch** responses to be communicated
        as arrays of dicts. This method parses out each individual
        element in the batch and returns a list of tuples, each
        tuple a result of parsing of each item in the batch.

        :Returns:   | tuple of (results, is_batch_mode_flag)
                    | where:
                    | - results is a tuple describing the request
                    | - Is_batch_mode_flag is a Bool indicating if the
                    |   request came in in batch mode (as array of requests) or not.

        :Raises:    RPCParseError, RPCInvalidRequest
        """
        try:
            batch = cls.json_loads(response_string)
        except ValueError as err:
            raise errors.RPCParseError("No valid JSON. (%s)" % str(err))

        if isinstance(batch, (list, tuple)) and batch:
            # batch is true batch.
            # list of parsed request objects, is_batch_mode_flag
            return [cls._parse_single_response_trap_errors(response) for response in batch], True
        elif isinstance(batch, dict):
            # `batch` is actually single response object
            return [cls._parse_single_response_trap_errors(batch)], False

        raise errors.RPCParseError("Neither a batch array nor a single response object found in the response.")