<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def translate(line, ascent, offs=0):
 """ offs -> shifts parallel to line ascent -> rotate line """

    # TODO: why do I have thuis factor here?
    ascent *= -2
    offs *= -2

    l0 = length(line)

    # change relative to line:
    t0 = offs  # -h+offs
    t1 = l0 * ascent + offs
    return translate2P(line, t0, t1)