class_docstr: Ranking metric.
class_docstr_tok: ["Ranking","metric","."]
docstr: Parse measure name of the form 'measure_name' or 'measure_name.k' into its parts.
docstr_tok: ["Parse","measure","name","of","the","form","'measure_name","'","or","'measure_name.k","'","into","its","parts","."]
code: def parse_measure_name(
      measure_name: str,
  ) -> Tuple[str, Optional[int]]:
      """Parse measure name of the form 'measure_name' or 'measure_name.k' into its parts."""
      measure_delimiter = "."
      if measure_delimiter in measure_name:
          measure_name, k = measure_name.split(measure_delimiter)
          return measure_name, int(k)
      return measure_name, None
  
imports: from dataclasses import dataclass
  from typing import Callable, Dict, List, Tuple, Optional
  import pytrec_eval
  from helm.benchmark.adaptation.adapters.adapter_factory import ADAPT_RANKING_BINARY
  from helm.benchmark.adaptation.request_state import RequestState
  from helm.benchmark.adaptation.adapter_spec import AdapterSpec
  from helm.benchmark.scenarios.scenario import unpack_tag, CORRECT_TAG, Reference
  from helm.common.request import RequestResult
  from helm.common.general import binarize_dict
  from .metric import Metric
  from .metric_name import MetricName
  from .metric_service import MetricService
  from .statistic import Stat
label_desc: Use image node_id 2 for calling the RankingMetric obj's underlying member method code with example usage: obj.parse_measure_name(measure_name) and returns: measure_name,  None, measure_name,  int