code: def getidx(self, val: Any) -> int:
      try:
          return self._val2i[val]
      except KeyError:
          self._val2i[val] = self._next_i
          self._i2val.append(val)
          self._next_i += 1
          return self._next_i - 1
  
file_path: scattertext/scattertext/indexstore/IndexStore.py
imports: from typing import Any, Iterable, List, Set, Tuple
label_desc: Use image node_id 8 for calling the IndexStore obj's underlying member method code with example usage: obj.getidx(val) and returns: self, unknown