def METHOD_NAME(
		testCase: unittest.TestCase,
		decider: Decider,
		expectedDecision: bool,
		useAssertDictContainsSubset: bool = False,
		**expectedKwargs
):
	"""A context manager that allows testing a Decider.
	@param testCase: The test case to apply the assertion on.
	@param decider: The Decider that will be consulted by the test case.
	@param expectedDecision: The expected decision as returned by L{Decider.decide}
		it will also be yielded by the context manager.
	@param useAssertDictContainsSubset: Whether to use L{unittest.TestCase.assertDictContainsSubset} instead of
		L{unittest.TestCase.assertDictEqual}
		This can be used if a decider is consulted with dictionary values that can't be predicted at test time,
		such as a driver instance.
	@param expectedKwargs: The kwargs that are expected to be passed to the decider handler
	"""
	expectedKwargs["_called"] = True
	actualKwargs = {}
	def handler(**kwargs):
		actualKwargs.update(kwargs)
		actualKwargs["_called"] = True
		return expectedDecision
	decider.register(handler)
	try:
		yield expectedDecision
	finally:
		decider.unregister(handler)
		testFunc = testCase.assertDictContainsSubset if useAssertDictContainsSubset else testCase.assertDictEqual
		testFunc(expectedKwargs, actualKwargs)