def magmom_lane_corrector(magmom_list: list, true_ratio: int) -> list:
    """
    Args:
        magmom_list (list)  - list of magnetic atoms from uncorrected INCAR file
        true_ratio  (int)   - ratio of uncorrected number atoms to the right number

    Returns:
        new_magmom_list (list) - list with corrected configuration for the afm cell

    Examples:
        magmom_lane_corrector([1, 1, 1, 0, 0], 2)
        >>> ([1, 1, 1, -1, -1, -1, 0, 0, 0, 0])

        magmom_lane_corrector([2, 0], 2)
        >>> ([2, -2, 0, 0])
    """

    magnetic_atoms_list = [i for i in magmom_list if i] * true_ratio
    noNmagnetic_atoms_list = [i for i in magmom_list if not i] * true_ratio
    middle_index = len(magnetic_atoms_list) // 2
    second_half = magnetic_atoms_list[middle_index:]
    magnetic_atoms_list[middle_index:] = [-i for i in second_half]
    new_magmom_list = magnetic_atoms_list + noNmagnetic_atoms_list
    return new_magmom_list