<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def assert_valid_sdl(document_ast: DocumentNode) -> None: """Assert document is valid SDL. Utility function which asserts a SDL document is valid by throwing an error if it is invalid. """


    errors = validate_sdl(document_ast)
    if errors:
        raise TypeError("\n\n".join(error.message for error in errors))