code: def chk_module_statements(ctx, module_stmt, canonical=False):
      
      return chk_statement(ctx, module_stmt, top_stmts, canonical)
docs: Validate the statement hierarchy according to the grammar.
  
      Return True if module is valid, False otherwise.