So this line ended with two parentheses, which looks to be a mistake. Turns out d.update(dict, kwargs....) works, but I think this whole block of code was intended to be d.update(dict) only. I've moved the paren to the bottom.