def METHOD_NAME(cls):
    # Loads the asdl module dynamically, since it's not in a real importable
    # package.
    # Parses Python.asdl into an ast.Module and run the check on it.
    # There's no need to do this for each test method, hence setUpClass.
    sys.path.insert(0, parser_dir)
    loader = importlib.machinery.SourceFileLoader(
            'asdl', os.path.join(parser_dir, 'asdl.py'))
    spec = importlib.util.spec_from_loader('asdl', loader)
    module = importlib.util.module_from_spec(spec)
    loader.exec_module(module)
    cls.asdl = module
    cls.mod = cls.asdl.parse(os.path.join(parser_dir, 'Python.asdl'))
    cls.assertTrue(cls.asdl.check(cls.mod), 'Module validation failed')