def translate(curve, z0):
if isinstance(curve, Path):<EOL><INDENT>return Path(*[translate(seg, z0) for seg in curve])<EOL><DEDENT>elif is_bezier_segment(curve):<EOL><INDENT>return bpoints2bezier([bpt + z0 for bpt in curve.bpoints()])<EOL><DEDENT>elif isinstance(curve, Arc):<EOL><INDENT>new_start = curve.start + z0<EOL>new_end = curve.end + z0<EOL>return Arc(new_start, radius=curve.radius, rotation=curve.rotation,<EOL>large_arc=curve.large_arc, sweep=curve.sweep, end=new_end)<EOL><DEDENT>else:<EOL><INDENT>raise TypeError("<STR_LIT>"<EOL>"<STR_LIT>")<EOL><DEDENT>
Shifts the curve by the complex quantity z such that
    translate(curve, z0).point(t) = curve.point(t) + z0