def valid_elements(symbols,reference):
    """Tests a list for elements that are not in the reference.

    Args:
        symbols (list): The list whose elements to check.
        reference (list): The list containing all allowed elements.

    Returns:
        valid (bool): True if symbols only contains elements from the reference.

    """

    valid = True

    if reference is not None:
        for sym in symbols:
            if sym not in reference:
                valid = False

    return valid