def unique_subjects_sessions_to_subjects_sessions(
    unique_subject_list, per_subject_session_list
):
    """Do reverse operation of get_unique_subjects function.

    Example:
        >>> from clinicaml.utils.participant import unique_subjects_sessions_to_subjects_sessions
        >>> unique_subjects_sessions_to_subjects_sessions(['sub-01', 'sub-02'], [['ses-M00', 'ses-M18'], ['ses-M00']])
        (['sub-CLNC01', 'sub-01', 'sub-02'], ['ses-M00', 'ses-M18', 'ses-M00'])

    """
    list_participants = []
    list_sessions = []
    for idx, participant_id in enumerate(unique_subject_list):
        for session_id in per_subject_session_list[idx]:
            list_participants.append(participant_id)
            list_sessions.append(session_id)

    return list_participants, list_sessions