Actually, how about, rather than specifically looking at the keyword args that `theano.function` requires just passing the entire kwargs dict down.  This seems more idiomatic to me.  I might play with this and provide a PR on top of your branch.