class_docstr: Ease my suffering. Map compressed group id -> key tuple
class_docstr_tok: ["Ease","my","suffering",".","Map","compressed","group","id","-",">","key","tuple"]
code: def __init__(self, comp_ids, ngroups, levels, labels):
      self.levels = levels
      self.labels = labels
      self.comp_ids = comp_ids.astype(np.int64)
  
      self.k = len(labels)
      self.tables = [
          hashtable.Int64HashTable(ngroups) for _ in range(self.k)
      ]
  
      self._populate_tables()
  
imports: import warnings
  import numpy
  from pandas._libs import algos, hashtable, lib
  from pandas._libs.hashtable import unique_label_indices
  from pandas.compat import PY3, long, string_types
  from pandas.core.dtypes.cast import infer_dtype_from_array
  from pandas.core.dtypes.common import ensure_int64, ensure_platform_int, is_categorical_dtype, is_list_like
  from pandas.core.dtypes.missing import isna
  import pandas.core.algorithms
label_desc: Use image node_id 1 to create a new _KeyMapper object from inherited base classes: object with example: obj = _KeyMapper(comp_ids, ngroups, levels, labels)