from typing import Dict
from typing import List


def convert_spin_to_list(spins: Dict) -> List:
    """Convert the Spin dictionary from the ssoCard into a list.
    Add the spin index as parameter to the Spin entries.

    Parameters
    ----------
    spin : dict
        The dictionary located at parameters.physical.spin in the ssoCard.

    Returns
    -------
    list
        A list of dictionaries, with one dictionary for each entry in parameters.physical.spin
        after removing the index layer.
    """

    spin_dicts = []

    for spin_id, spin_dict in spins.items():
        spin_dict["id_"] = spin_id
        spin_dicts.append(spin_dict)

    return spin_dicts