def evaluate(self, sample, eval_key=None):
        """Performs ActivityNet-style evaluation on the given video.

        Predicted segments are matched to ground truth segments in descending
        order of confidence, with matches requiring a minimum IoU of
        ``self.config.iou``.

        The ``self.config.classwise`` parameter controls whether to only match
        segments with the same class label (True) or allow matches between
        classes (False).

        Args:
            sample: a :class:`fiftyone.core.sample.Sample`
            eval_key (None): the evaluation key for this evaluation

        Returns:
            a list of matched
            ``(gt_label, pred_label, iou, pred_confidence, gt_id, pred_id)``
            tuples
        """
        gts = sample[self.gt_field]
        preds = sample[self.pred_field]

        if eval_key is None:
            # Don't save results on user's data
            eval_key = "eval"
            gts = _copy_labels(gts)
            preds = _copy_labels(preds)

        return _activitynet_evaluation_single_iou(
            gts, preds, eval_key, self.config
        )
Performs ActivityNet-style evaluation on the given video.

        Predicted segments are matched to ground truth segments in descending
        order of confidence, with matches requiring a minimum IoU of
        ``self.config.iou``.

        The ``self.config.classwise`` parameter controls whether to only match
        segments with the same class label (True) or allow matches between
        classes (False).

        Args:
            sample: a :class:`fiftyone.core.sample.Sample`
            eval_key (None): the evaluation key for this evaluation

        Returns:
            a list of matched
            ``(gt_label, pred_label, iou, pred_confidence, gt_id, pred_id)``
            tuples
        
fiftyone/utils/eval/activitynet.py