from typing import Dict


def get_solver(solver:Dict)->Dict:
    """get the solver as a dictionary

    Args:
        solver (Dict): solver from config.yaml

    Returns:
        Dict: solver after filtering out the undeclair variables
    """
    def get_solver_by_key(_key: str):
        out_val = solver[_key] if _key in solver.keys() else -1
        return out_val

    out_solver = dict()

    # Basic parameters
    out_solver['name'] = get_solver_by_key('name')
    out_solver['label'] = get_solver_by_key('label')
    out_solver['color'] = get_solver_by_key('color')
    out_solver['marker'] = get_solver_by_key('marker')

    # Bounded suboptimal solvers
    out_solver['w'] = get_solver_by_key('w')
    out_solver['mth'] = get_solver_by_key('mth')

    # FEECBS parameters
    out_solver['T_N'] = get_solver_by_key('T_N')
    out_solver['T_i'] = get_solver_by_key('T_i')

    return out_solver