from typing import List


def sum_numbers(number_list: List[float]) -> float:
    """Example function. Sums a list of numbers using a for loop.

    Parameters
    ----------
    number_list : list
        List of ints or floats

    Returns
    -------
    int or float
        Sum of list

    Notes
    -----
    This is NOT good Python, just an example function for tests.

    Examples
    --------
    >>> number_list = [2, 3, 4]
    >>> sum_numbers(number_list)
    9

    Empty lists are returned as zero
    >>> zero_number_list = []
    >>> sum_numbers(zero_number_list)
    0

    Does not sum strings. Will return value error
    >>> not_number_list = [2, 3, 'stuff']
    >>> sum_numbers(not_number_list) # doctest: +IGNORE_EXCEPTION_DETAIL
    Traceback (most recent call last):
        raise ValueError(
    ValueError: sum_numbers sums a list containing only ints and floats

    Nor will it sum list of lists, dicts, sets, or tuples.
    # doctest: +IGNORE_EXCEPTION_DETAIL
    >>> another_not_number_list = [[4], 5]
    >>> sum_numbers(another_not_number_list)
    Traceback (most recent call last):
        raise ValueError(
    ValueError: ...

    Bools are alright though.
    >>> bool_list = [True, False, False, True, True]
    >>> sum_numbers(bool_list)
    3

    Will sum tuples
    >>> number_tuple = (4, 9, 16)
    >>> sum_numbers(number_tuple)
    29

    """

    sum_val: float = 0
    for n in number_list:
        if not isinstance(n, (float, int)):
            raise ValueError(
                'sum_numbers sums a list containing only ints and floats.')
        sum_val += n

    return sum_val