def _no_overlap(y, z, y1, z1, y2, z2, pt_id, pt_1_id, pt_2_id):
    """
    Checks if a point (y,z) is inside a line given by (y1,z1) and
    (y2,z2). Also check if the point id matches with the ids from the line.

    Returns
    -------
    Boolean
    """
    if y < min(y1, y2) or y > max(y1, y2) or z < min(z1, z2) or z > max(z1, z2
        ):
        return True
    elif pt_id == pt_1_id or pt_id == pt_2_id:
        return True
    else:
        return False
