def partial(fn, **kwargs):
    rval = functools.partial(fn, **kwargs)
    if hasattr(fn, 'fmin_pass_expr_memo_ctrl'):
        rval.fmin_pass_expr_memo_ctrl = fn.fmin_pass_expr_memo_ctrl
    return rval
functools.partial work-alike for functions decorated with
dataset/ETHPy150Open hyperopt/hyperopt/hyperopt/fmin.py/partial