def chk_module_statements(ctx, module_stmt, canonical=False):
    """Validate the statement hierarchy according to the grammar.

    Return True if module is valid, False otherwise.
    """
    return chk_statement(ctx, module_stmt, top_stmts, canonical)
Validate the statement hierarchy according to the grammar.

    Return True if module is valid, False otherwise.