code: def get_model_select_metric(self, metrics: DenseRetrievalMetrics):
      if self.model_select_metric == DenseRetrievalMetricNames.ACCURACY:
          metric = metrics.accuracy
      elif (
          self.model_select_metric == DenseRetrievalMetricNames.AVG_RANK
      ):
          metric = metrics.average_rank
      elif (
          self.model_select_metric
          == DenseRetrievalMetricNames.MEAN_RECIPROCAL_RANK
      ):
          metric = metrics.mean_reciprocal_rank
      else:
          raise ValueError(
              f"Unknown metric: {self.model_select_metric}"
          )
  
      return metric
  
imports: from enum import Enum
  from typing import Any, Dict, List
  import numpy
  from pytext.common.constants import Stage
  from pytext.metric_reporters.channel import Channel, ConsoleChannel, FileChannel
  from pytext.metric_reporters.metric_reporter import MetricReporter
  from pytext.metrics.dense_retrieval_metrics import DenseRetrievalMetrics
label_desc: Use image node_id 7 for calling the DenseRetrievalMetricReporter obj's underlying member method code with example usage: obj.get_model_select_metric(metrics) and returns: metric