def restore_base(model, first_solution, copy_of_dmu_codes, max_slack_solution):
    """ Helper function used for restoring DMU codes and first solution.

        Args:
            model (ModelBase): model used in the peel the onion.
            first_solution (Solution): first solution of the peel the
                onion.
            copy_of_dmu_codes (list of str): list of original DMU codes.
            max_slack_solution (Solution): solution obtained by two phase
                model if any.
    """
    model.input_data.DMU_codes = copy_of_dmu_codes
    if max_slack_solution:
        model.second_solution = max_slack_solution
    assert first_solution
