def METHOD_NAME(cls):
    mapper = {}
    for i, cat in enumerate(cls.CATEGORY_META_INFO):
        mapper[cat['id']] = i
    cls._id_mapper = mapper
    cls._id_rev_mapper = {v: k for k, v in cls._id_mapper.items()}