def convert_to_list(xml_value):
    """
    An expected list of references is None for zero values, a dict for
    one value, and a list for two or more values. Use this function to
    standardize to a list. If individual items contain an "@ref" field, use
    that in the returned list, otherwise return the whole item

    Args:
        xml_value (dict or list): value to transform to a list

    Returns:
        list: processed list of values from original xml_value
    """
    if not xml_value:
        return []
    elif isinstance(xml_value, dict):
        return [xml_value.get('@ref', xml_value)]

    else:
        return [val.get('@ref', val) for val in xml_value]