def METHOD_NAME(self, detections):
    def gated_metric(tracks, dets, track_indices, detection_indices):
        features = np.array([dets[i].feature for i in detection_indices])
        targets = np.array([tracks[i].track_id for i in track_indices])
        cost_matrix = self.metric.distance(features, targets)
        cost_matrix = gate_cost_matrix(self.motion, cost_matrix, tracks,
                                       dets, track_indices,
                                       detection_indices)
        return cost_matrix
    # Split track set into confirmed and unconfirmed tracks.
    confirmed_tracks = [
        i for i, t in enumerate(self.tracks) if t.is_confirmed()
    ]
    unconfirmed_tracks = [
        i for i, t in enumerate(self.tracks) if not t.is_confirmed()
    ]
    # Associate confirmed tracks using appearance features.
    matches_a, unmatched_tracks_a, unmatched_detections = \
        matching_cascade(
            gated_metric, self.metric.matching_threshold, self.max_age,
            self.tracks, detections, confirmed_tracks)
    # Associate remaining tracks together with unconfirmed tracks using IOU.
    iou_track_candidates = unconfirmed_tracks + [
        k for k in unmatched_tracks_a
        if self.tracks[k].time_since_update == 1
    ]
    unmatched_tracks_a = [
        k for k in unmatched_tracks_a
        if self.tracks[k].time_since_update != 1
    ]
    matches_b, unmatched_tracks_b, unmatched_detections = \
        min_cost_matching(
            iou_cost, self.max_iou_distance, self.tracks,
            detections, iou_track_candidates, unmatched_detections)
    matches = matches_a + matches_b
    unmatched_tracks = list(set(unmatched_tracks_a + unmatched_tracks_b))
    return matches, unmatched_tracks, unmatched_detections