It's unusual to use kwargs, but then pull specific keys from it.  Are you sure this is the best way?