def METHOD_NAME(self, path, A, B, inside):
    print("finding", A, B)
    sub = None
    for i in range(0, len(path) * 2):  # iterate twice with wrap around
        j = i % len(path)
        seg = path[j]
        if inside.isInside(seg.midPoint()):
            if eq(seg.A, A):
                sub = Path("subp")
            print("seg", sub is None, seg)
            if sub is not None:
                sub.append(seg)
            if eq(seg.B, B):
                break
    print("found", sub)
    return sub