def METHOD_NAME(a1, b1, a2, b2, tolerance=0.05):
    """Compute the intersection of a segment a1, b1 with a segment a2, b2. a1, a2, b1 and b2 are vectors. Returns a Vector2D."""
    # src: http://stackoverflow.com/questions/563198/how-do-you-detect-where-two-line-segments-intersect
    # Note: Almost the same can be achieved using LineString.intersection(), but the coplanar bounds are
    #       rejected. For this reason, a custom algorithm is preferred there.
    assert isinstance(a1, Vector2D)
    assert isinstance(b1, Vector2D)
    assert isinstance(a2, Vector2D)
    assert isinstance(b2, Vector2D)
    ls1 = LineString([[a1.x, a1.y], [b1.x, b1.y]]).buffer(tolerance)
    ls2 = LineString([[a2.x, a2.y], [b2.x, b2.y]]).buffer(tolerance)
    intersection = ls1.intersection(ls2)
    if intersection is not None and len(intersection.centroid.coords) == 1:
        return Vector2D(intersection.centroid.coords[0][0], intersection.centroid.coords[0][1])
    return None