human
How I can get rid of None values in dictionary?
assistant
Here is some code to get rid of None values in dictionary `kwargs`

res = dict((k, v) for k, v in kwargs.items() if v is not None)

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.