class_docstr: Ranking metric.
class_docstr_tok: ["Ranking","metric","."]
docstr: Get the true relevance dictionary.
docstr_tok: ["Get","the","true","relevance","dictionary","."]
code: def get_true_relevances(
      self, ranking_objects: List[RankingObject]
  ) -> Dict[str, int]:
      """Get the true relevance dictionary."""
      return {
          self.get_query_string(obj.reference_index): obj.relevance
          for obj in ranking_objects
          if obj.relevance
      }
  
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 9 for calling the RankingMetric obj's underlying member method code with example usage: obj.get_true_relevances(ranking_objects) and returns: unknown