def _check_errors(self, errors, prefix):
        """Check for errors and possible raise and format an error message.

        :param errors: List of error messages.
        :param prefix: str, Prefix message for error messages
        """
        args = []

        for uid, messages in errors:
            error_msg = []
            error_msg.append(prefix % uid)
            for msg in messages:
                error_msg.append(" (-) %s" % msg)
            args.append("\n".join(error_msg))

        if args:
            raise RuntimeError(*args)
Check for errors and possible raise and format an error message.

        :param errors: List of error messages.
        :param prefix: str, Prefix message for error messages