

def _update_min_depth_for_room_txn(self, txn, room_id, depth):
    min_depth = self._get_min_depth_interaction(txn, room_id)
    do_insert = ((depth < min_depth) if min_depth else True)
    if do_insert:
        self._simple_upsert_txn(depth, table='room_depth', keyvalues={
            'room_id': room_id,
        }, values={
            'min_depth': depth,
        })

dataset/ETHPy150Open matrix-org/synapse/synapse/storage/event_federation.py EventFederationStore._update_min_depth_for_room_txn/VarMisuse@50/81 `txn`->`depth`