class_docstr: Individual fairness perturbation for person names.
class_docstr_tok: ["Individual","fairness","perturbation","for","person","names","."]
docstr: Return possible names given a selected class, using self.mapping_dict
docstr_tok: ["Return","possible","names","given","a","selected","class",",","using","self.mapping_dict"]
code: def get_possible_names(
      self, selected_class: Dict[str, str]
  ) -> List[str]:
      """Return possible names given a selected class, using self.mapping_dict"""
      selected_names = []
      for cat, val in selected_class.items():
          assert self.mapping_dict[cat][val]
          selected_names.append(self.mapping_dict[cat][val])
      possible_names = reduce(
          lambda a, b: [item for item in a if item in b], selected_names
      )
      return possible_names
  
imports: import os
  import re
  from collections import defaultdict
  from dataclasses import dataclass, replace
  from functools import reduce
  from pathlib import Path
  from random import Random
  from typing import Dict, List, Optional, Set
  from helm.benchmark.scenarios.scenario import Input, Instance, Reference, Output
  from helm.common.general import ensure_file_downloaded, ensure_directory_exists, match_case
  from .perturbation_description import PerturbationDescription
  from .perturbation import Perturbation
label_desc: Use image node_id 4 for calling the PersonNamePerturbation obj's underlying member method code with example usage: obj.get_possible_names(selected_class) and returns: possible_names