def append(prev: str, new: str) -> str:
    """
    Concatenates two strings, adding a new line character between the two strings
    if the first string is not empty.

    """
    if prev:
        return prev + "\n" + new
    else:
        return new