def intern_dict(dictionary):
    return {
        KNOWN_KEYS.get(key, key): _intern_known_values(key, value)
        for key, value in dictionary.items()
    }
Takes a dictionary and interns well known keys and their values
dataset/ETHPy150Open matrix-org/synapse/synapse/util/caches/__init__.py/intern_dict