<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def run_sbml_validation(document, notifications):
 """Report errors and warnings found in an SBML document."""

    validator = libsbml.SBMLValidator()
    validator.validate(document)
    for i in range(document.getNumErrors()):
        notifications['errors'].append(format_failure(document.getError(i)))
    for i in range(validator.getNumFailures()):
        failure = validator.getFailure(i)
        if failure.isWarning():
            notifications['warnings'].append(format_failure(failure))
        else:
            notifications['errors'].append(format_failure(failure))