'Fetches the collection identified by `from_hcda_id` and dispatches individual collection elements to
_copy_hda_to_library_folder'

def _copy_hdca_to_library_folder(self, trans, hda_manager, from_hdca_id, folder_id, ldda_message=''):

    hdca = trans.sa_session.query(trans.app.model.HistoryDatasetCollectionAssociation).get(from_hdca_id)
    if (hdca.collection.collection_type != 'list'):
        raise exceptions.NotImplemented('Cannot    add    nested    collections    to    library.    Please    flatten    your    collection    first.')
    hdas = []
    for element in hdca.collection.elements:
        hdas.append((element.element_identifier, element.dataset_instance.id))
    return [self._copy_hda_to_library_folder(trans, hda_manager=hda_manager, from_hda_id=hda_id, folder_id=folder_id, ldda_message=ldda_message, element_identifier=element_identifier) for (element_identifier, hda_id) in hdas]
