with

fun <T> with(context: ModelSelectionContext, block: () -> T): T

Run block with context active, restoring the previous context afterwards.