def raises_Invalid(function):
 def call_and_assert(*args, **kwargs):
  nose.tools.assert_raises(df.Invalid, function, *args, **kwargs)
 return call_and_assert

def raises_Invalid ( function ) : def call_and_assert ( * args , ** kwargs ) : nose . tools . assert_raises ( df . Invalid , function , * args , ** kwargs ) return call_and_assert
a decorator that asserts that the decorated function raises dictization_functions .