def Prepend( prefix, 
             content,
             skip_first_line=True,
             skip_empty_lines=False,
           ):
    """Prepends the prefix to each line of the provided content."""

    lines = content.split('\n')
    
    # We don't want to append the prefix to a trailing newline, regardless
    # of the setting of skip_empty_lines.
    if lines and len(lines) > 1 and not lines[-1]:
        trailing_newline = True
        lines.pop()
    else:
        trailing_newline = False

    # Create the new content
    content = []

    for line in lines:
        if skip_first_line:
            skip_first_line = False
        elif line or not skip_empty_lines:
            line = "{}{}".format(prefix, line)

        content.append(line)

    content = '\n'.join(content)
    
    if trailing_newline:
        content += '\n'

    return content