

def store_instance(self, instance, id_map):
    for (field, attname) in self.field_to_name:
        identity = field.to_field.python_value(instance._data[attname])
        key = (field, identity)
        if self.backref:
            id_map[key] = instance
        else:
            identity.setdefault(key, [])
            id_map[key].append(instance)

dataset/ETHPy150Open coleifer/peewee/peewee.py PrefetchResult.store_instance/VarMisuse@70/86 `id_map`->`identity`