def METHOD_NAME(self,
          model: torch.nn.Module,
          feats: List[torch.Tensor],
          data_sample: DetDataSample,
          rescale=True,
          **kwargs) -> InstanceData:
    """Tracking forward function.
    Args:
        model (nn.Module): VIS model.
        img (Tensor): of shape (T, C, H, W) encoding input image.
            Typically these should be mean centered and std scaled.
            The T denotes the number of key images and usually is 1 in
            MaskTrackRCNN method.
        feats (list[Tensor]): Multi level feature maps of `img`.
        data_sample (:obj:`TrackDataSample`): The data sample.
            It includes information such as `pred_det_instances`.
        rescale (bool, optional): If True, the bounding boxes should be
            rescaled to fit the original scale of the image. Defaults to
            True.
    Returns:
        :obj:`InstanceData`: Tracking results of the input images.
        Each InstanceData usually contains ``bboxes``, ``labels``,
        ``scores`` and ``instances_id``.
    """
    metainfo = data_sample.metainfo
    bboxes = data_sample.pred_instances.bboxes
    masks = data_sample.pred_instances.masks
    labels = data_sample.pred_instances.labels
    scores = data_sample.pred_instances.scores
    frame_id = metainfo.get('frame_id', -1)
    # create pred_track_instances
    pred_track_instances = InstanceData()
    if bboxes.shape[0] == 0:
        ids = torch.zeros_like(labels)
        pred_track_instances = data_sample.pred_instances.clone()
        pred_track_instances.instances_id = ids
        return pred_track_instances
    rescaled_bboxes = bboxes.clone()
    if rescale:
        scale_factor = rescaled_bboxes.new_tensor(
            metainfo['scale_factor']).repeat((1, 2))
        rescaled_bboxes = rescaled_bboxes * scale_factor
    roi_feats, _ = model.track_head.extract_roi_feats(
        feats, [rescaled_bboxes])
    if self.empty:
        num_new_tracks = bboxes.size(0)
        ids = torch.arange(
            self.num_tracks,
            self.num_tracks + num_new_tracks,
            dtype=torch.long)
        self.num_tracks += num_new_tracks
    else:
        prev_bboxes = self.get('bboxes')
        prev_labels = self.get('labels')
        prev_roi_feats = self.get('roi_feats')
        similarity_logits = model.track_head.predict(
            roi_feats, prev_roi_feats)
        match_scores = self.get_match_score(bboxes, labels, scores,
                                            prev_bboxes, prev_labels,
                                            similarity_logits)
        ids, _ = self.assign_ids(match_scores)
    valid_inds = ids > -1
    ids = ids[valid_inds]
    bboxes = bboxes[valid_inds]
    labels = labels[valid_inds]
    scores = scores[valid_inds]
    masks = masks[valid_inds]
    roi_feats = roi_feats[valid_inds]
    self.update(
        ids=ids,
        bboxes=bboxes,
        labels=labels,
        scores=scores,
        masks=masks,
        roi_feats=roi_feats,
        frame_ids=frame_id)
    # update pred_track_instances
    pred_track_instances.bboxes = bboxes
    pred_track_instances.masks = masks
    pred_track_instances.labels = labels
    pred_track_instances.scores = scores
    pred_track_instances.instances_id = ids
    return pred_track_instances