<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def join_lines(line1, line2):
 """Join 2 lines of text 'abcde' 'ab' """

    if line1 == u"":
        pass
    elif line1[-1] == u'-':
        # hyphenated word at the end of the
        # line - don't add in a space and remove hyphen
        line1 = line1[:-1]
    elif line1[-1] != u' ':
        # no space at the end of this
        # line, add in a space
        line1 = line1 + u' '
    return line1 + line2