def stretch(seq, n):
    """
    Form a new sequence by duplicating every sample in seq n times.
    """
    stretched = []
    for s in seq:
        for _ in range(n):
            stretched.append(s)

    return stretched