class_docstr: Analyze results of machine learning experiments.
docstr: Check if metric has already been evaluated.
docstr_tok: ["Check","if","metric","has","already","been","evaluated","."]
code: def _validate_metric_name(self, metric_name):
      """Check if metric has already been evaluated."""
      if metric_name is None:
          metric_name = self._metric_names[
              -1
          ]  # if None, use the last evaluated metric
  
      if metric_name not in self._metric_names:
          raise ValueError(
              f"{metric_name} has not been evaluated yet. Please call "
              f"'evaluate' with the appropriate arguments first"
          )
  
      return metric_name
  
imports: import itertools
  import numpy
  import pandas
  from scipy import stats
  from scipy.stats import ranksums, ttest_ind
  from sktime.benchmarking.base import BaseResults
  from sktime.exceptions import NotEvaluatedError
  from sktime.utils.validation._dependencies import _check_soft_dependencies
label_desc: Use image node_id 20 for calling the Evaluator obj's underlying member method code with example usage: obj._validate_metric_name(metric_name) and returns: metric_name