code: def translate(curve, z0):
      
      if isinstance(curve, Path):
          return Path(*[translate(seg, z0) for seg in curve])
      elif is_bezier_segment(curve):
          return bpoints2bezier([bpt + z0 for bpt in curve.bpoints()])
      elif isinstance(curve, Arc):
          new_start = curve.start + z0
          new_end = curve.end + z0
          return Arc(new_start, radius=curve.radius, rotation=curve.rotation,
                     large_arc=curve.large_arc, sweep=curve.sweep, end=new_end)
      else:
          raise TypeError("Input `curve` should be a Path, Line, "
                          "QuadraticBezier, CubicBezier, or Arc object.")
docs: Shifts the curve by the complex quantity z such that
      translate(curve, z0).point(t) = curve.point(t) + z0