def cut_line_with_context(line):
    """
    A intelligent line cutting algorithm with context info.
    :param line: a LineString instance of shapely
    :return: a tuple of (sampled_points_indices, distances)
    """
    assert line.geom_type == 'LineString'
    pass
