def get_mode_dict_from_list(modes_resouces):
    """
    Takes in a list of modes and returns a dictionary of them indexed by their IDs

    Parameters
    ----------
    modes_resouces : list
        a list of modes
    """
    return {mode.id: mode for mode in modes_resouces}