def list_to_serialized(ref, the_list):
    """Serialize the list of elements

    Used for the retention store

    :param ref: Not used
    :type ref:
    :param the_list: dictionary to convert
    :type the_list: dict
    :return: dict of serialized
    :rtype: dict
    """
    result = []
    for elt in the_list:
        if not getattr(elt, 'serialize', None):
            continue
        result.append(elt.serialize())
    return result