def cut_edge(all_tracks, track_ids):
    """
    Removes a predecessor-successor link.
    Args:
        all_tracks: dict containing all trajectories
        track_ids: tuple of tracks (predecessor id, successor id)

    Returns: dict containing all trajectories

    """
    succ_track_id = track_ids[1]
    pred_track_id = track_ids[0]
    if pred_track_id in all_tracks:
        pred_track = all_tracks[pred_track_id]
        if succ_track_id in pred_track.successors:
            pred_track.successors.remove(succ_track_id)
    if succ_track_id in all_tracks:
        successor_track = all_tracks[succ_track_id]
        if pred_track_id in successor_track.pred_track_id:
            successor_track.pred_track_id.remove(pred_track_id)
        if len(successor_track.pred_track_id) == 0:
            successor_track.pred_track_id = [0]
    return all_tracks