def construct_pipeline(cfg):
    """Construct the pipeline steps for sklearn.pipeline.Pipeline.

    Construct the pipeline steps for sklearn.pipeline.Pipeline and
    return the steps and the parameter to optimize (e.g. "logit__C" for
    the parameter "C" of the step named "logit").

    Parameters:
    -----------
    cfg : dict,
        method configuration describing the steps of an pipelined estimator
    """
    steps = cfg["steps"]
    try:
        est_param = cfg["est_param"]
    except __HOLE__:
        est_param = None
    pipe = []
    for step in steps:
        pipe.append(_get_step(step))
    return {'steps': pipe}, est_param
dataset/ETHPy150Open BenoitDamota/mempamal/mempamal/dynamic.py/construct_pipeline