def _from_yaml_to_func(method, params):
    prm = dict()
    if params is not None:
        for key, val in params.iteritems():
            prm[key] = eval(str(val))
    return eval(method)(**prm)
go from yaml to method.
dataset/ETHPy150Open alexandrebarachant/Grasp-and-lift-EEG-challenge/lvl1/genPreds.py/_from_yaml_to_func