class_docstr: Transforms an input by Reverse gender or place names in sentences.
class_docstr_tok: ["Transforms","an","input","by","Reverse","gender","or","place","names","in","sentences","."]
code: def get_loc_data(self, path):
      # Get some regions and place names
      loc2idx = {}
      idx2loc = {}
      m = 0
      for line in plain_lines_loader(path):
          line = line.strip().split("\t")
          line[1] = int(line[1])
          loc2idx[line[0]] = line[1]
          m = max(m, len(line[0].split(" ")))
          if line[1] in idx2loc:
              idx2loc[line[1]].append(line[0])
          else:
              idx2loc[line[1]] = [line[0]]
      self.max_len_loc = m
      return loc2idx, idx2loc
  
file_path: textflint/textflint/generation/transformation/UT/prejudice.py
imports: import random
  from ..transformation import Transformation
  from ....common.utils.file_io import read_json
  from ....common.utils.list_op import descartes
  from ....common.utils.load import plain_lines_loader
  from ....common.utils.install import download_if_needed
  from ....common.settings import PREJUDICE_PATH, PREJUDICE_WORD_PATH, PREJUDICE_LOC_PATH, PREJUDICE_LOC2IDX
label_desc: Use image node_id 4 for calling the Prejudice obj's underlying member method code with example usage: obj.get_loc_data(path) and returns: loc2idx,  idx2loc