def import_param_space(filename):
    content = ""
    with open(filename) as f:
        lines = f.readlines()
        for l in lines:
            if "if __name__ ==" in l:
                # beware: we assume that the __main__ execution block is the
                # last one in the file
                break
            content += l
    vars = {}
    exec(content, vars)
    return vars["param_space"]
Create a fake scheduler with a list of work to do.
dataset/ETHPy150Open rlpy/rlpy/rlpy/Tools/hypersearch.py/import_param_space--crossover with--dataset/ETHPy150Open twisted/twisted/twisted/test/test_cooperator.py/FakeScheduler.__init__