def func(**kw):
    print('kw', kw)
ext = {'threadid': 1, 'xxx': 2}
func(ext = ext)