code: def intersect(self, other_seg, tol=1e-12):
          
          if isinstance(other_seg, Line):
              return bezier_by_line_intersections(self, other_seg)
          elif (isinstance(other_seg, QuadraticBezier) or
                isinstance(other_seg, CubicBezier)):
              assert self != other_seg
              longer_length = max(self.length(), other_seg.length())
              return bezier_intersections(self, other_seg,
                                          longer_length=longer_length,
                                          tol=tol, tol_deC=tol)
          elif isinstance(other_seg, Arc):
              t2t1s = other_seg.intersect(self)
              return [(t1, t2) for t2, t1 in t2t1s]
          elif isinstance(other_seg, Path):
              raise TypeError(
                  "other_seg must be a path segment, not a Path object, use "
                  "Path.intersect().")
          else:
              raise TypeError("other_seg must be a path segment.")
docs: Finds the intersections of two segments.
          returns a list of tuples (t1, t2) such that
          self.point(t1) == other_seg.point(t2).
          Note: This will fail if the two segments coincide for more than a
          finite collection of points.