def METHOD_NAME(self, solution, inverse_data):
    """Returns the solution to the original problem given the inverse_data.
    """
    attr = {}
    if solution["solve_method"] == s.SCS:
        import scs
        if Version(scs.__version__) < Version('3.0.0'):
            status = scs_conif.SCS.STATUS_MAP[solution["info"]["statusVal"]]
            attr[s.SOLVE_TIME] = solution["info"]["solveTime"]
            attr[s.SETUP_TIME] = solution["info"]["setupTime"]
        else:
            status = scs_conif.SCS.STATUS_MAP[solution["info"]["status_val"]]
            attr[s.SOLVE_TIME] = solution["info"]["solve_time"]
            attr[s.SETUP_TIME] = solution["info"]["setup_time"]
    elif solution["solve_method"] == s.ECOS:
        status = self.STATUS_MAP[solution["info"]["status"]]
        attr[s.SOLVE_TIME] = solution["info"]["solveTime"]
        attr[s.SETUP_TIME] = solution["info"]["setupTime"]
    attr[s.NUM_ITERS] = solution["info"]["iter"]
    attr[s.EXTRA_STATS] = solution
    if status in s.SOLUTION_PRESENT:
        primal_val = solution["info"]["pobj"]
        opt_val = primal_val + inverse_data[s.OFFSET]
        # TODO expand primal and dual variables from lower triangular to full.
        # TODO but this makes map from solution to variables not a slice.
        primal_vars = {
            inverse_data[DIFFCP.VAR_ID]: solution["x"]
        }
        eq_dual_vars = utilities.get_dual_values(
            solution["y"][:inverse_data[ConicSolver.DIMS].zero],
            self.extract_dual_value,
            inverse_data[DIFFCP.EQ_CONSTR]
        )
        ineq_dual_vars = utilities.get_dual_values(
            solution["y"][inverse_data[ConicSolver.DIMS].zero:],
            self.extract_dual_value,
            inverse_data[DIFFCP.NEQ_CONSTR]
        )
        dual_vars = {}
        dual_vars.update(eq_dual_vars)
        dual_vars.update(ineq_dual_vars)
        return Solution(status, opt_val, primal_vars, dual_vars, attr)
    else:
        return failure_solution(status, attr)