<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def to_exceptions(cls, errors):
 """ Convert the validation errors into ValidationFailure exc's Transform native schematics validation errors into a goldman ValidationFailure exception. :param errors: dict of errors in schematics format :return: list of ValidationFailure exception objects """


        ret = []

        for key, val in errors.items():
            if key in cls.relationships:
                attr = '/data/relationships/%s' % key
            else:
                attr = '/data/attributes/%s' % key

            for error in val:
                ret.append(ValidationFailure(attr, detail=error))

        return ret