class_docstr: Individual fairness perturbation for dialect.
class_docstr_tok: ["Individual","fairness","perturbation","for","dialect","."]
docstr: Download the mapping dict for self.source_class to self.target_class, if available.
docstr_tok: ["Download","the","mapping","dict","for","self.source_class","to","self.target_class",",","if","available","."]
code: def retrieve_mapping_dict(self) -> str:
      """Download the mapping dict for self.source_class to self.target_class, if available."""
      mapping_tuple = (self.source_class, self.target_class)
      if mapping_tuple not in self.MAPPING_DICT_URIS:
          msg = f"""The mapping from the source class {self.source_class} to the
                        target class {self.target_class} isn't available in {self.MAPPING_DICT_URIS}.
                     """
          raise ValueError(msg)
      file_name = (
          f"{self.source_class}_to_{self.target_class}_mapping.json"
      )
      target_file_path: str = os.path.join(self.output_path, file_name)
      ensure_file_downloaded(
          source_url=self.MAPPING_DICT_URIS[mapping_tuple],
          target_path=target_file_path,
      )
      return target_file_path
  
file_path: H2O/h2o_hf/helm/src/helm/benchmark/augmentations/dialect_perturbation.py
imports: from dataclasses import dataclass
  import json
  import os
  from random import Random
  import re
  from pathlib import Path
  from typing import Dict, Optional, List
  from helm.common.general import match_case, ensure_file_downloaded
  from .perturbation_description import PerturbationDescription
  from .perturbation import Perturbation
label_desc: Use image node_id 3 for calling the DialectPerturbation obj's underlying member method code with example usage: obj.retrieve_mapping_dict() and returns: target_file_path