from typing import List
from typing import Union


def compute_partial_sums(
        seq: List[Union[int, complex]],
) -> List[Union[int, complex]]:
    """
    Returns a list of the partial sums of a sequence.

    Input:
        seq: a list of integers or complex numbers

    Output:
        a list of integers or complex numbers

    Examples:
    >>> compute_partial_sums([1, 1, 1, 1])
    [1, 2, 3, 4]
    """
    ret_list = []
    partial_sum: Union[int, complex] = 0
    for elem in seq:
        # mypy issue 2128 again on this line
        partial_sum += elem
        ret_list.append(partial_sum)
    return ret_list