def __init__(self, mapping):
    super(RenameUnknowns, self).__init__()
    self.name_to_cls = {name: hash(cls) for (name, cls) in mapping.items()}
    self.cls_to_canonical_name = {cls: name for (name, cls) in self.name_to_cls.items()}
def __init__(self, mapping):
    super(RenameUnknowns, self).__init__()
    self.name_to_cls = {name: hash(cls) for (name, cls) in mapping.items()}
    self.cls_to_canonical_name = {cls: name for (name, cls) in self.name_to_cls.items()}