def rename(self, samples, config, eval_key, new_eval_key):
        """Performs any necessary operations required to rename this evaluation
        metric's key.

        Args:
            samples: a :class:`fiftyone.core.collections.SampleCollection`
            config: an :class:`fiftyone.core.evaluation.EvaluationMethodConfig`
            eval_key: an evaluation key
            new_eval_key: a new evaluation key
        """
        dataset = samples._dataset
        for metric_field in self.get_fields(samples, config, eval_key):
            metric_field, is_frame_field = samples._handle_frame_field(
                metric_field
            )
            new_metric_field = metric_field.replace(eval_key, new_eval_key, 1)
            if is_frame_field:
                dataset.rename_frame_field(metric_field, new_metric_field)
            else:
                dataset.rename_sample_field(metric_field, new_metric_field)
Performs any necessary operations required to rename this evaluation
        metric's key.

        Args:
            samples: a :class:`fiftyone.core.collections.SampleCollection`
            config: an :class:`fiftyone.core.evaluation.EvaluationMethodConfig`
            eval_key: an evaluation key
            new_eval_key: a new evaluation key
        
fiftyone/operators/evaluation_metric.py