def verify_experiment_module(verbose):
ok = True<EOL>if not os.path.exists("<STR_LIT>"):<EOL><INDENT>return False<EOL><DEDENT>temp_package_name = "<STR_LIT>"<EOL>tmp = tempfile.mkdtemp()<EOL>clone_dir = os.path.join(tmp, temp_package_name)<EOL>to_ignore = shutil.ignore_patterns(<EOL>os.path.join("<STR_LIT>", "<STR_LIT:*>"), "<STR_LIT>", "<STR_LIT>", "<STR_LIT:data>", "<STR_LIT>"<EOL>)<EOL>shutil.copytree(os.getcwd(), clone_dir, ignore=to_ignore)<EOL>initialize_experiment_package(clone_dir)<EOL>from dallinger_experiment import experiment<EOL>if clone_dir not in experiment.__file__:<EOL><INDENT>raise ImportError("<STR_LIT>")<EOL><DEDENT>classes = inspect.getmembers(experiment, inspect.isclass)<EOL>exps = [c for c in classes if (c[<NUM_LIT:1>].__bases__[<NUM_LIT:0>].__name__ in "<STR_LIT>")]<EOL>for entry in [k for k in sys.modules if temp_package_name in k]:<EOL><INDENT>del sys.modules[entry]<EOL><DEDENT>if len(exps) == <NUM_LIT:0>:<EOL><INDENT>log(<EOL>"<STR_LIT>",<EOL>delay=<NUM_LIT:0>,<EOL>chevrons=False,<EOL>verbose=verbose,<EOL>)<EOL>ok = False<EOL><DEDENT>elif len(exps) == <NUM_LIT:1>:<EOL><INDENT>log(<EOL>"<STR_LIT>",<EOL>delay=<NUM_LIT:0>,<EOL>chevrons=False,<EOL>verbose=verbose,<EOL>)<EOL><DEDENT>else:<EOL><INDENT>log(<EOL>"<STR_LIT>",<EOL>delay=<NUM_LIT:0>,<EOL>chevrons=False,<EOL>verbose=verbose,<EOL>)<EOL>ok = False<EOL><DEDENT>return ok<EOL>
Perform basic sanity checks on experiment.py.