def shared_paths(g1, g2):
    if not isinstance(g1, LineString):
        raise TypeError("First geometry must be a LineString")
    if not isinstance(g2, LineString):
        raise TypeError("Second geometry must be a LineString")
    return(geom_factory(lgeos.methods['shared_paths'](g1._geom, g2._geom)))
Find paths shared between the two given lineal geometries
dataset/ETHPy150Open Toblerity/Shapely/shapely/ops.py/shared_paths